Sonatype Nexus 3 - get latest snapshot

前端 未结 10 1505
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 06:28

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 whic

10条回答
  •  佛祖请我去吃肉
    2020-12-31 07:10

    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

提交回复
热议问题