Copy Maven dependencies to folder

06 May, 2015
How can to copy all maven dependencies to a target folder say lib

If you want to copy all dependencies (jars) to a destination folder.
The Maven Dependency Plug-In assists you to copy maven dependencies to a target folder.

Include the following plugin in your pom file:

org.apache.maven.plugins maven-dependency-plugin copy-dependencies package copy-dependencies ${project.build.directory}/alternateLocation false false true


From command prompt run : mvn dependency:copy-dependencies

You will now have a target folder with all your jars!

No comments:

Post a Comment