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
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.
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.
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
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