NorthIsUp
NorthIsUp

Reputation: 17877

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

Upvotes: 1

Views: 200

Answers (1)

Jason Stafford
Jason Stafford

Reputation: 21

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

Upvotes: 1

Related Questions