I have Linux OS and I do not have access to REST API, so I used following commands to get the latest version of snapshots from Nexus:
An example snapshots maven-metadata.xml from WSO2 repository:
$ curl -s "http://maven.wso2.org/nexus/content/repositories/snapshots/org/wso2/is/wso2is/maven-metadata.xml"
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.wso2.is</groupId>
<artifactId>wso2is</artifactId>
<versioning>
<latest>5.3.0-SNAPSHOT</latest>
<release></release>
<versions>
<version>5.1.0-SNAPSHOT</version>
<version>5.2.0-SNAPSHOT</version>
<version>5.3.0-SNAPSHOT</version>
</versions>
<lastUpdated>20160914062755</lastUpdated>
</versioning>
</metadata>
Extracting from latest XML tag inside maven-metadata.xml:
curl -s "http://maven.wso2.org/nexus/content/repositories/snapshots/org/wso2/is/wso2is/maven-metadata.xml" | \
grep "<latest>.*</latest>" | \
sed -e "s#\(.*\)\(<latest>\)\(.*\)\(</latest>\)\(.*\)#\3#g"
Extracting from version XML tag inside maven-metadata.xml:
curl -s "http://maven.wso2.org/nexus/content/repositories/snapshots/org/wso2/is/wso2is/maven-metadata.xml" | \
grep "<version>.*</version>" | \
sort | uniq | tail -n1 | \
sed -e "s#\(.*\)\(<version>\)\(.*\)\(</version>\)\(.*\)#\3#g"
The result of both of the commands until today 14 Sep 2016 is:
5.3.0-SNAPSHOT