I tried using this:
mvn dependency:get -DrepoUrl=http://myserver/artifactory -Dartifact=com.mypackage:my-package-name:1.0.0
However it just downloaded the pom.xml in my artifactory i have my-package-name-1.0.0-20120328.121341-3.jar
what i wish the command line to do is to download the snapshot with latest snapshot (without specifying the snapshot timestamp in the command line ofcourse). can anyone let me know how to do it?
thanks
Append -SNAPSHOT to the version you specify.
That is, you now request version 1.0.0 which is a release version, but the artifact you want is a unique snapshot. If you request version 1.0.0-SNAPSHOT, you're practically telling Maven that you want the latest snapshot version of 1.0.0 with no special preference.
Maven will resolve the artifact's Maven metadata from Artifactory and pick the latest snapshot file to download.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With