I am trying to use the nexus REST api to get the latest version of a maven artifact. I am able to browse to the specific version I am looking for using http://repo.loc
After trying the REST service with the LATEST
version, and discovering it doesn't always work (See @Stanislav response) I ended up creating this one-liner Linux command for parsing the metadata.xml file:
wget -O - -o /dev/null https://repo1.maven.org/maven2/org/brutusin/wava/maven-metadata.xml | grep -Po '(?<=)([0-9\.]+(-SNAPSHOT)?)' | sort --version-sort -r | head -n 1
Just change the to the appropiate url, and it should work for you.
Cheers