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:

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

Useful entry points