no, current implementation result is 1-0-2 < 1-1 here is the proof: $ java -jar maven-artifact-3.5.3.jar 1-0-2 1-1 Display parameters as parsed by Maven (in canonical form) and comparison result: 1. 1-0-2 == 1-2 1-0-2 < 1-1 2. 1-1 == 1-1
then explanations: who uses dashes (-) instead of dots (.) as version separator? dash is not a normal version separator in Maven: it's used to as a separator between version and qualifier then 1-0-2 is something that we don't really understand: 1.0-2 or 1.0.2 would have a meaning, but not 1-0-2 Then honestly, I won't even try to understand how we got to the conclusion that 1-0-2 canonical representation is 1-2: I'd question people who wrote 1-0-2 as version string Regards, Hervé Le jeudi 31 mai 2018, 16:22:18 CEST Ross Goldberg a écrit : > The maven Maven version order spec ( > https://maven.apache.org/pom.html#Version_Order_Specification) indicates > that : > > 1-0-2 is equivalent to 1-2, so 1-0-2 = 1-2 > 1-1. > > That doesn't make much sense to me. > > I think the following line from the spec should be revised from: > > Then, starting from the end of the version, the trailing "null" values (0, > "", "final", "ga") are trimmed. > > To: > > Then, starting from the end of the version string, all trailing "null" > qualifier tokens ("", "final", "ga") are trimmed. All trailing numeric 0 > tokens that do not immediately follow a hyphen prefix (regardless of > whether the hyphen is explicit or implicit) are likewise trimmed. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
