-
Notifications
You must be signed in to change notification settings - Fork 142
[MNG-7559] Fix version comparison with case insensitive lexical order #1683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
pls check the up to date spec for resolver versions: |
|
for reference :
this PR might need to be split into 2 PRs
|
311ee68 to
1db950f
Compare
|
we have to discuss how to address the other discouraged qualifiers used in java ee / jarktaee:
in order to fix all the encountered problems. or state on website/javadoc that this will be a no-fix intend to fix apache/maven#8891 step by step
|
1db950f to
8d9bd92
Compare
8f05f18 to
d9da093
Compare
d9da093 to
790483d
Compare
|
IMPORTANT: https://maven.apache.org/pom.html#Version_Order_Specification is the one and only normative source for maven version comparison. If there are any bugs in this, file them, one issue per bug. However, the default assumption is that if the code or other docs differ from what is described here, then it is the code or other doc that is at fault and needs to be changed. |
elharo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maven does not, cannot, and will not special case every qualifier any project has ever invented. In particular it does not special case:
- pr
- preview
- pre
- dev
They are treated like any other string as described in https://maven.apache.org/pom.html#Version_Order_Specification
|
Thank you for clarifying the current handling of qualifiers.
Such a statement would help reduce confusion across the ecosystem and promote consistent versioning practices. |
This PR description was edited to reflect its latest status:
Recurring issues show that Maven’s current handling of qualifiers is incomplete, impacting multiple companies and users:
display-dependency-updatesversion comparison algorithm bug for-pfdmojohaus/versions#744-preversion suffix as prerelease. dependabot/dependabot-core#10207These issues need to be addressed in Maven Resolver. I am working to encourage Maven to adopt a fix through this PR.
Proposed ordering:
I edited the documentation to discourage the use of certain qualifiers:
Optional inclusions:
As long as discouraged qualifiers continue to be used in practice, tools will still need to support them. Once they are phased out, however, support can be safely dropped.
Another possible direction would be:
Thanks for your input.
Following this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
mvn -Prun-its verify).If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.
To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.