is there an endpoint in Nexus to get the artifact’s latest version number (pom’s version)?
If the artifact’s latest version in Nexus is 0.0.8-SNAPSHOT, the endpoint would return 0.0.8-SNAPSHOT.
You can use the following Nexus resolve
REST API to obtain an XML document containing details about the POM, including the version:
http://nexus/service/local/artifact/maven/resolve?g=groupId&a=artifactId&v=LATEST&r=snapshots&p=pom
You'd then need to parse the text in the baseVersion
element, e.g.
<artifact-resolution>
<data>
...
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>1.0-20160000.100000-1</version>
<baseVersion>1.0-SNAPSHOT</baseVersion>
<extension>pom</extension>
<snapshot>true</snapshot>
...
</data>
</artifact-resolution>
Reference: