1

for a hubot script i need to determine the most recent release version of an artifact. All artifacts are deployed to a sonatype nexus, so i want to use the nexus api to do that.

Is there a way to get the nexus api to return just the version number?

Laures
  • 5,389
  • 11
  • 50
  • 76
  • 1
    possible duplicate of [Using the Nexus rest API to get latest artifact version for given groupid/artficatid](http://stackoverflow.com/questions/7911620/using-the-nexus-rest-api-to-get-latest-artifact-version-for-given-groupid-artfic) – Mark O'Connor Sep 19 '13 at 19:16
  • @MarkO'Connor the difference this question and the referenced question is i want to know the VERSION without downloading. – Laures Sep 20 '13 at 08:42
  • 1
    Try this one instead: http://stackoverflow.com/questions/12211385/oss-nexus-how-to-use-rest-api-to-retrieve-last-version-as-a-text/12223091#12223091 – Mark O'Connor Sep 20 '13 at 21:37
  • @MarkO'Connor works great. thank you. if you want an accepted answer just create one. – Laures Sep 23 '13 at 08:47

1 Answers1

1

as described here i can use the "resolve" function that returns all information about an artifact i could ever want

For Example:

https://oss.sonatype.org/service/local/artifact/maven/resolve?r=cometd-snapshots&g=org.cometd.jetty&a=cometd-jetty-client&v=1.0-SNAPSHOT&e=jar

Note:

  • the type (e) is optional, the default value is jar
  • it is possible to get a json result, but in case of errors or non existing artifacts the result is ALWAYS html
  • the versions LATEST and RELEASE are supported
Community
  • 1
  • 1
Laures
  • 5,389
  • 11
  • 50
  • 76