As is documented here
you can use the maven-artifact JAR file to test version numbers and their relative order.
Unfortunately the output does not match what is used in
when describing the "Trimming Examples". It's matter of == versus ->. I prefer the one used in the documentation, so I'd like to change maven-artifact to use ->. It represents a transformation (trimming in this case) – not a an equality test.
Another problem is that it does not show you the list of tokens that are the result of parsing the version numbers. This can be quite useful when trying to figure out why you are getting the results you are.