I am trying to pull the latest artifact from my Nexus repository. I am using the get command to pull the artifact.
mvn dependency:get -Durl=http://nexus-repository:8080/nexus/content/repositories/snapshots -Dartifact=com.my.company:common:LATEST-Dtransitive=false -Ddest=. -s settings.xml
And it is the error message I am getting.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:get (default-cli) on project standalone-pom: Couldn't download artifact: Failed to resolve version for com.my.company:common:jar:LATEST: Could not find metadata com.my.company:common/maven-metadata.xml in releases (http://nexus-repository:8080/nexus/content/repositories/releases)
I do not know either why it is looking on release and not in snapshots because the version is on my snapshots repository.
When I run with the specific version everything works fine:
mvn dependency:get -Durl=http://nexus-repository:8080/nexus/content/repositories/snapshots -Dartifact=com.my.company:common:1.0.0-SNAPSHOT -Dtransitive=false -Ddest=. -s settings.xml
I will like to pull the latest version using mvn command and not curl neither wget.
Any recommendation or idea?