mvn dependency:copy from the cli
I'm trying to use mvn dependency:copy from the cli (without having to make a pom) the purpose is to get the latest version of a specific artifact from either Nexus or the local .m2 and copy it to a specific location.
Currently I have this, but am kind of lost on the correct way to pass in the artifactItems list.
mvn dependency开发者_高级运维:copy \
-DgroupId=some.group \
-DartifactId=some.artifact \
-Dversion=1.0.0-SNAPSHOT \
-Dtype=zip
It's not very clear from the documentation on the apache site, but with some experimentation I discovered that what you want is:
mvn dependency:copy -Dartifact=some.group:some.artifact:1.0.0-SNAPSHOT:zip \
-DoutputDirectory=MyFolder
精彩评论