Sonatype Nexus 3 - get latest snapshot

前端 未结 10 1455
爱一瞬间的悲伤
爱一瞬间的悲伤 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:06

    What a joke re: Nexus 3 having no REST API.

    I found a hack that alleviates my problem. Turns out that ansible has a nice maven_artifact module that is somehow able to figure out the latest snapshot. And you can run ansible locally. So it ends up looking like this:

    ansible all -i localhost, -c local -m maven_artifact -a "repository_url=https://my-nexus/repository/maven-snapshots/ group_id=com.whatever artifact_id=my-artifact version=2.0-SNAPSHOT dest=./my-artifact.jar"
    

提交回复
热议问题