Reputation: 81
I deployed many maven project on nexus. Now I want to use a maven command to download a jar package and its dependencies by giving its coordinate. I have the following solution:
mvn compile
to the new maven project. maven will download the target jar and its dependencies to local repository.There must have better solution to download jar from nexus directly without creating new maven project. Just like a command: mvn download -DgroupId:ArtifactId:Version
.
Do you know the similar command or some plugins have the goal.
Upvotes: 3
Views: 12809
Reputation: 2320
Use the dependency plugin: https://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html
https://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html See How do I download a Maven artifact at the command line without using dependency:get or maven-download-plugin?
Upvotes: 6