How to create a link to get the latest release of an artifact?
E.g. org.foo:bar
would have 1.0 and 2.0, and the link would return the 2.0 release;
and when 3.0 is released and deployed, the same link would return the 3.0 release, etc.

- 53,795
- 33
- 135
- 209

- 434
- 2
- 5
- 14
3 Answers
I wouldn't use "LATEST" but if you want the latest release, you can ask with the "RELEASE" keyword:
http://somerepo.org/service/local/artifact/maven/redirect?r=central-proxy&g=groupId&a=artifactId&v=RELEASE
This will get you the latest given release, not just "LATEST" which will give you the last thing built (last thing uploaded for that group+artifact combo).

- 121
- 3
In nexus 3, according to official manual
You can download the archive by search download API:
http://${nexus host}/service/rest/v1/search/assets/download?repository={repoName}&group={group}&name=core&maven.baseVersion=x.x.x-SNAPSHOT&sort=version&direction=desc&maven.extension=jar
It will automatically sort by version field and fetch the latest one
The inner API list you can find in Manage UI > System > API
, it is written by swagger
I have found about this kind of query:
http://somerepo.org/service/local/artifact/maven/redirect?r=central-proxy&g=groupId&a=artifactId&v=LATEST
But at the same time, a discouraging text explanation:
So while this may work to some extent, it's not something really supported by Nexus.

- 434
- 2
- 5
- 14