-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[MNG-7559] Fix versions comparison #845
Conversation
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
194316a
to
9372f04
Compare
made the items attribute private with a public getter to respect the code standard |
83a0828
to
8e382dd
Compare
added regression test cases |
code: documentation: |
|
e467f85
to
9b33d69
Compare
added another test case to prove website documentation right |
code and documentation on par. waiting for final reviews. |
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.
I'm still digging into the other PRs and the existing spec and code. Pleas ebear with me. It's been a while since I looked at this, and I need to make sure all the fiddly little bits are straight in my head.
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
ea and preview removed and let treated with natural ordering
removed the public visibilities |
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
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.
Check the output of the CI. The test failures look related.
made 3 changes.
|
@elharo, rebased and applied code styles with spotless plugin |
7b078b3
to
8bd408c
Compare
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.
Looks good, just some doc nits
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
Outdated
Show resolved
Hide resolved
maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java
Outdated
Show resolved
Hide resolved
made the suggested change, thanks @elharo |
@elharo, fixed javadoc build errors by replacing > with > and < with < |
All looks good. I need to copy the PR into my account to run it through Jenkins |
Jenkins passed my fork of this so I'm going to merge. https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven/job/MNG-7559/ |
@elharo is it wished to port this to 3.9.x branch? if so a PR is available here: |
Check on the dev mailing list and see of anyone is planning another 3.9 release. |
This merge has been reverted on master. |
A new clean PR was created to reintroduce the fix |
Fix versions comparison https://issues.apache.org/jira/browse/MNG-7559
intention is:
following semver rules should be encouraged, natural ordering is used without the need to hard code strings, except for hard coded qualifiers 'a', 'b', 'm', 'cr', 'snapshot', 'final', 'ga', 'release', '' and 'sp':
the documentation should discourage the usage of 'CR', 'final', 'ga', 'release' and 'SP' qualifiers.
Maven Central should begin to reject new artifact using CR and SP qualifiers.
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY
, where you replaceMNG-XXX
and
SUMMARY
with the appropriate JIRA issue. Best practice is to use the JIRA issuetitle in the pull request title and in the first line of the commit message.
mvn clean verify
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
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.