Maven Artifact

Maven Artifact classes, providing Artifact interface (javadoc), with its DefaultArtifact implementation (source).

The jar file is executable and provides a little tool to display how Maven parses and compares versions:

$ java -jar maven-artifact-*.jar 3.2.4-alpha-1 3.2.4-SNAPSHOT
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 3.2.4-alpha-1 == 3.2.4.alpha.1
   3.2.4-alpha-1 < 3.2.4-SNAPSHOT
2. 3.2.4-SNAPSHOT == 3.2.4.snapshot
   3.2.4-SNAPSHOT <
3. == 3.2.4

Useful entry points