Although it's not common but it really happens in real life. Usually maven already automatically downloads all dependencies to local repository, and for some reason you want to get some or all dependency jar files of this project. For example you final package is a executable jar but not a "contain-all" uber executable jar. You only need to deploy these dependencies jars once on running host. This make building process much faster than create a uber executable jar by shade plugin.
Run following command in project home directory (pom.xml in the current direcotry)
mvn dependency:copy-dependencies
Now you will find all dependency jar files get copied to directory target/dependency, like the following snapshot.
0 comments:
Post a Comment