Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonatype Nexus 3 - get latest snapshot

We've just upgraded out nexus installation to the latest release (3.x). Is there any way to get the latest version of a given snapshot artifact? Nexus 2 had a nice API which is not supported anymore.

Same question (but for the old version) has been answered here: Sonatype Nexus REST Api fetch latest build version

Any ideas are highly appreciated.

Best, Daniel

like image 749
Daniel Avatar asked May 17 '16 15:05

Daniel


People also ask

How do I download latest Nexus snapshot?

Use this endpoint /service/rest/v1/search/assets/download with repository , group and name arguments. Sorting by version will get you the latest timestamped snapshot. 2 shots of whiskey to this gentleman! This solved exactly my use case: having a link that automatically retrieves the most recent snapshot/release.

How do I download repository from Nexus repository manager?

To download the latest Nexus Repository Manager OSS distribution, go to Sonatype's OSS download page and choose the compressed bundle file that suits your need from the Nexus Repository Manager OSS 2. x section. A download will begin to the latest version. Older versions can be found here if needed.


1 Answers

Asof April 2019 there IS a REST API in Sonatype Nexus 3 for accessing the latest artefact

Documentation is here

http://community.sonatype.com/t/nxrm-3-16-rest-search-and-filtering-enhancements/1586

Use this endpoint /service/rest/v1/search/assets/download with repository, group and name arguments. Sorting by version will get you the latest timestamped snapshot.

https://nexus.blahblah.com/service/rest/v1/search/assets/download?repository=maven-snapshots&group=com.my.company&name=myArtefact&sort=version&direction=desc

like image 50
user1717259 Avatar answered Sep 23 '22 09:09

user1717259