I\'m trying to have a Project B pull down (and unpack) a ZIP built by Project A and deployed to a remote repository.
The ZIP is cre
If you ever want to do something like this from the command line (e.g. from a script without having to write a pom.xml
file), here's the way to do it...
You can either specify the individual properties:
mvn dependency:copy -DgroupId=org.apache.maven -DartifactId=maven-core -Dversion=2.2.1 -Dpackaging=zip -Dclassifier=thisistheattachedartifactsclassifier
Or specify them all in one artifact
parameter:
mvn dependency:copy -Dartifact=org.apache.maven:maven-core:2.2.1:zip:thisistheattachedartifactsclassifier
With the latter, it is important to keep the classifier
at the end, after the packaging/type
attribute. Like this: -Dartifact=groupId:artifactId:version:type:classifier
You can also optionally specify the target directory using the -DoutputDirectory=
parameter if required.