Hi,
What makes Things worse, is that some repositories, especially Sonatype/Mavencentral get messed up by the non-numeric parts like qualifiers (except "SNAPSHOT") significantly since they overhauled their UI to make it " nice and trendy".
If you take the example of the JSR 385 API
https://mvnrepository.com/artifact/javax.measure/unit-api
shows correctly, that the most recent version is "2.0".
Even the detail view at Sonatype https://search.maven.org/artifact/javax.measure/unit-api
Shows the order correctly, but if you see another view
https://search.maven.org/search?q=javax.measure
it makes the wrong statement, that "2.0-PRD" was the latest version, and you also end up with that using certain build tools that try to guess the "latest" version.
In my experience at least this Mavencentral bug also assumes that "x.y-rc02" < "x.y-rc1" or similar with "b1" vs. "b01" etc.
Werner
Sent from Mail for Windows 10
Hi Markus
> Maven is able to find latest builds (i. e. 1.1.1-2 is a later build than 1.1.1-1) only if the build is all-numbers.
I don't think that's true.
> Using ranges like [1.0; 1.1) will care for that build numbers, IMHO not only for the major, minor and patch numbers.
> Maven cannot do that if there is a letter in the build number, because it treats that as a non-buildnumber but as a "qualifier"
> (See Maven Version Syntax description). "qualifiers" are not necessarily integral.
I'm pretty sure that info is not complete. Can you link to "Maven
Version Syntax" you mentioned?
Per [1]:
>> Non-numeric ("qualifiers") tokens have the alphabetical order, except for the following tokens which come first in this order:
>> "alpha" < "beta" < "milestone" < "rc" = "cr" < "snapshot" < "" = "final" = "ga" < "sp"
> For example Maven has no clue if -rc1 is later or earlier that -rc01.
as 1 == 01 they are the same.
However there is that special case for "b" qualifier (which is alias
for "beta") also used by discussed [2] in different role.
1. https://maven.apache.org/pom.html#Version_Order_Specification to
see that qualifiers _are_ taken into consideration
2. https://wiki.eclipse.org/JakartaEE_Maven_Versioning_Rules
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev