I have maven nexus local repository, on run time i download/fetch jar/war file from maven repo and copy it to tomcat. I am using following url to to download jar/war file.
http://localhost/maven/nexus/service/local/artifact/maven/redirect?r=releases&g=com.rdc.app&a=rum&v=LATEST&p=war&c
When i pass param v=1.2.4 i can download the specific version of war, if i want latest version i found that v=LATEST will return latest version of jar/war file in the repo.
Problem is latest version in maven repo is 12.53.3 when i use v=LATEST it is downloading 12.46.1 i to update 12.53.3 again and tried again v=LATEST but result was same as before.
Also if latest jar is SNAPSHOT other then release jar/war v=LATEST only support release version.
I tried following documentation but seems it is not working.
repository.sonatype.org/nexus-core-documentation-plugin/core/docs/rest.artifact.maven.redirect.html
This is sort of a bug, if you ask me. I have faced it as well.
Basically, LATEST version doesn't mean "latest version" as is in 1.2.3 compared to 1.2.2, it means "the version of the artifact which was most recently deployed". So -- if you have more than one branch of the project and the artifacts are being deployed by your continuous integration server, you can't trust LATEST.
UPDATE: Check Tari aka Manga's reply, for an updated behavior in Nexus.
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