Vampire commented on code in PR #707: URL: https://github.com/apache/maven-site/pull/707#discussion_r1970648152
########## content/apt/pom.apt.vm: ########## @@ -479,31 +479,31 @@ mvn install:install-file -Dfile=non-maven-proj.jar -DgroupId=some.group -Dartifa * "<<<1-foo2>>>" \< "<<<1-foo10>>>" (correctly automatically "switching" to numeric order) - * "<<<1.foo>>>" = "<<<1-foo>>>" \< "<<<1-1>>>" = "<<<1.1>>>" + * "<<<1.foo>>>" = "<<<1-foo>>>" \< "<<<1-1>>>" \< "<<<1.1>>>" * "<<<1.ga>>>" = "<<<1-ga>>>" = "<<<1-0>>>" = "<<<1.0>>>" = "<<<1>>>" (removing of trailing "null" values) * "<<<1-sp>>>" \> "<<<1-ga>>>" * "<<<1-sp.1>>>" \> "<<<1-ga.1>>>" - * "<<<1-sp-1>>>" \> "<<<1-ga-1>>>" + * "<<<1-sp-1>>>" \< "<<<1-ga-1>>>" * "<<<1-a1>>>" = "<<<1-alpha-1>>>" * "<<<1.0-alpha1>>>" = "<<<1.0-ALPHA1>>>" (case insensitivity) - * "<<<1.7>>>" \> "1.K" + * "<<<1.7>>>" \> "<<<1.K>>>" - * "<<5.zebra>>>" \> "5.aardvark" + * "<<<5.zebra>>>" \> "<<<5.aardvark>>>" - * "<<1.α>>>" \> "1.b" (Note the Greek letter alpha.) + * "<<<1.α>>>" \> "<<<1.b>>>" (Note the Greek letter alpha.) Note: Contrary to what was stated in some design documents, for version order, snapshots are not treated differently than releases or any other qualifier. Note: As <<<2.0-rc1>>> \< <<<2.0>>>, the version requirement <<<[1.0,2.0)>>> excludes <<<2.0>>> but includes version <<<2.0-rc1>>>, which is contrary to what most people expect. In addition, Gradle interprets it differently, resulting in different dependency trees for the same POM. - If the intention is to restrict it to <1.*> versions, the better version requirement is <<<[1,1.999999)>>>. + If the intention is to restrict it to <<<1.*>>> versions, the better version requirement is <<<[1,1.999999)>>> or <<<[1,2alpha)>>>. Review Comment: Well, they do, and it is not a Gradle bug, but a different definition of version ordering. Actually I was wrong, the lowest possible version in Gradle land is `2-dev` while in Maven land it is `2-alpha`. For Gradle `alpha`, `beta`, and `milestone` are not in any way special tokens. `dev` is special in that it is lower than any other non-numeric part. And if that would not be the case, then the smallest would be `2-A`, as in Gradle comparison is case-sensitive and uppercase is less than lowercase. Also in Gradle `1-sp-1` would indeed be greater than `1-ga-1`, as in the Gradle algorithm no tokens are omitted and the actual separator never has a significance. And unlike Maven where `1.1` is equal to `1.1.0`, in Gradle the former is less than the latter. You can find the Gradle version ordering logic at https://docs.gradle.org/current/userguide/dependency_versions.html#sec:version-ordering Also this document is aware of the differences if you just look one line up where it says "Gradle interprets it differently, resulting in different dependency trees for the same POM.". If you think Gradle is buggy due to that, feel free to open a bug issue, but I'm pretty sure these differences were intentional decisions, just like Gradle also does not this nearest-wins thing Maven is doing, but does proper conflict resolution so that the most likely for all working version is used if nothing is controlled explicitly. Really foolproof you never are, but you have to adapt to the versioning strategy the target of that range is following. 🤷♂️ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org