maven-jar-plugin: This plugin provides the capability to build and sign jars. In Eclipse, for manually managed dependencies this works via context menu of build path entry -> Properties -> Java Source Attachment. Expand the Java node and select JAR file. maven-dependency-plugin: The dependency plugin provides the capability to manipulate artifacts. You will add the necessary dependencies, and build the project. Create and build a project. In order to create an executable jar, we don't need any additional dependencies.We just need to create Maven Java project, and have at least one class with the main(…) method.. However, for gradle-managed dependencies, that option is not available. In this step, you start Eclipse and create a Maven project. The build will produce a .jar… Do this by right clicking the project -> properties -> java build path -> Add External Jar -> pick mysql-connector-java-5.1.28-bin.jar. Here is a complete pom.xml file. Example Create a simple project. In the JAR File Specification page, select the resources that you want to export in the Select the resources to export field. com.logicbig.example maven-assembly-plugin-example … Create a project using maven-archetype-quickstart with following parameters. Use jar-with-dependencies as the descriptorRef of your assembly-plugin configuration in order to create a JAR which contains the binary output of your project, along its the unpacked dependencies. Mainly you would be interested in tag. Apache Maven Assembly plugin allows to create an executable jar which includes all its dependencies within it. However, we can create an 'uber' jar file using the maven-shade-plugin that will include the dependency classes inside of the uber jar file. Generating Single Jar file with all dependencies in Eclipse is easy. Note that jar-with-dependencies provides only basic support for uber-jars. It can copy and/or unpack artifacts from local or remote repositories to a specified location. We just need to follow below steps : Either from the context menu or from the menu bar’s File menu, select Export. The resultant jar is also called 'fat jar'. As a result, the uber jar file is self-contained in that it contains all of the dependencies that it needs in order to execute classes in the uber jar file. My dependency is in no repository, so I'm stuck with compile files for now. Note that the JAR file contains all the resources and dependencies (fat JAR or uber-JAR). Run the program within eclipse, it should run, and tell you that the username/password is invalid which means Eclipse is properly configured with the jar. Click Next. This built-in descriptor produces an assembly with the classifier jar-with-dependencies using the JAR archive format. In our example, we created Java class named ExecutableMavenJar.. We also need to make sure that our pom.xml contains the the following elements: 4.0.0 … In Eclipse, right click on the project and select Run As > Maven build, and specify the goal assembly:single in the dialog, then click Run: Wait a moment for the build to complete, and then check the JAR file generated under the project’s target directory. Does anybody know how what the gradle/buildship way to do this looks like?