Let say that there is 2 versions A
and B
. No matter what exactly they are. How they can be compared with maven? For example:
mvn someGoal A B
result to A is old then B
. E.g. can maven check version from command line?
Let say that there is 2 versions A
and B
. No matter what exactly they are. How they can be compared with maven? For example:
mvn someGoal A B
result to A is old then B
. E.g. can maven check version from command line?
It is not answer for original question, but good workaround. You can just checkou then maven sources with rigth version and then run org.apache.maven.artifact.versioning.ComparableVersion#main
from command line, ide, not matter. It display normilized version number, and compare version in passed arguments - very good tool. :)
The mentoined way of @Cherry is to use the command line like this:
java -jar apache-maven-3.3.9/lib/maven-artifact-3.3.9.jar 1.3.2 1.3.2-RC1
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 1.3.2 == 1.3.2
1.3.2 > 1.3.2-RC1
2. 1.3.2-RC1 == 1.3.2-rc-1
The mentoined way of @Cherry is to use the command line like this:
java -jar apache-maven-3.3.9/lib/maven-artifact-3.3.9.jar 1.3.2 1.3.2-RC1
Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 1.3.2 == 1.3.2
1.3.2 > 1.3.2-RC1
2. 1.3.2-RC1 == 1.3.2-rc-1
See also here: https://stackoverflow.com/a/37875486/1743880