[ 
https://issues.apache.org/jira/browse/MNG-7559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17640727#comment-17640727
 ] 

ASF GitHub Bot commented on MNG-7559:
-------------------------------------

sultan opened a new pull request, #887:
URL: https://github.com/apache/maven/pull/887

   Fix versions comparison https://issues.apache.org/jira/browse/MNG-7559
   intention is:
   * 1.0.0.RC1 < 1.0.0-RC2
   * ( edr, pfd, etc.) < final, ga, release
   * 9.4.1.jre16 > 9.4.1.jre16-preview
   
   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':
   * alpha = a < beta = b < milestone = m < rc = cr < 'snapshot' < '' = 'final' 
= 'ga' = 'release' < '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:
   
    - [x] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MNG) filed
          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.
    - [x] Each commit in the pull request should have a meaningful subject line 
and body.
    - [x] Format the pull request title like `[MNG-XXX] SUMMARY`, where you 
replace `MNG-XXX`
          and `SUMMARY` with the appropriate JIRA issue. Best practice is to 
use the JIRA issue
          title in the pull request title and in the first line of the commit 
message.
    - [x] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) 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](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [x] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
    - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   




> ComparableVersion vs versions with custom qualifiers
> ----------------------------------------------------
>
>                 Key: MNG-7559
>                 URL: https://issues.apache.org/jira/browse/MNG-7559
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.8.3
>            Reporter: Andrzej Jarmoniuk
>            Priority: Major
>         Attachments: image-2022-10-22-18-22-11-591.png
>
>
> Since I know that ComparableVersion was brought to Maven from 
> versions-maven-plugin, it turns out the bug described here:
> https://github.com/mojohaus/versions-maven-plugin/issues/744
> also exists in maven, at least in 3.8.3.
> According to the maven version spec, versions containing a qualifier should 
> be treated as less major than the same versions without the qualifier. 
> Currently it's only the case for a few "standard" qualifiers, e.g. "-rc*", 
> "-alpha", etc.
> However, it looks like "2.3-pfd" is deemed less major than "2.3".
> {code:java}
>     @Test
>     public void testComparableVersionWithCustomQualifier()
>     {
>         assertThat( new ComparableVersion( "2.3" ).compareTo( new 
> ComparableVersion( "2.3-pfd" ) ),
>                 greaterThan( 0 ) );
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to