target/sample-1.0-SNAPSHOT-jar-with-dependencies.jar Notice the artifact classifier, between the end of the version and the beginning of the file extension, jar-with-dependencies . This is the id of the assembly descriptor used to create this artifact. dateutils.jar – Only your project classes; dateutils-jar-with-dependencies.jar – Project and dependency classes in a single jar. Maven … The best way is to put the JAR in a folder created at the root of … If the local Jar file depends on other 3rd party dependencies you have to add them to YOUR pom.xml otherwise you are unable to build a portable project! org.apache.maven.plugins maven-dependency-plugin 2.8 copy-dep Normally, when we package a project into a jarW file, the jar file doesn't contain its dependencies, so the dependency jar files would need to be included in the classpathW in order to execute a class in the project's jar file that uses one of the dependencies. Two jar files will be created in the target folder. ... Can I add jars to maven 2 build classpath without installing them? I made a false assumption. Inside zip file, there will be folder name-version. Inside this folder, your executable jar and lib folder containing all dependency jars will be present. mvn assembly:assembly -DdescriptorId=jar-with-dependencies If you want to make this jar executable, just add the main class to be run to the plugin configuration: Another solution is to use the maven-install-plugin in your pom.xml which will install the jar during the Maven “initialize” phase. Check manifest.MF file of executable jar. To do this, you must specify the location of the jar you want to install. maven build success (on my project folder -> mvn clean package -DskipTests=true) and jar file & tests.jar file also was generated but didn’t generate zip-with-dependencies.zip file only... what is … If you install local Jar files their dependencies are not de-referenced and downloaded by Maven. 4. Review It. List out the content of dateutils-jar-with-dependencies.jar When running mvn package, here's how to end up with a lib folder inside the resulting jar file which contains all the runtime dependencies of your project. Warning! With Maven 2, the right way to do this is to use the Maven2 Assembly Plugin which has a pre-defined descriptor file for this purpose and that you could just use on the command line:. Just add the following to your pom.xml. How can I create an executable JAR with dependencies using Maven?