[ https://issues.apache.org/jira/browse/MNG-7559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17622664#comment-17622664 ]
ASF GitHub Bot commented on MNG-7559: ------------------------------------- sultan commented on code in PR #845: URL: https://github.com/apache/maven/pull/845#discussion_r1002523615 ########## maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java: ########## @@ -354,15 +354,15 @@ public String toString() implements Item { private static final List<String> QUALIFIERS = - Arrays.asList( "alpha", "beta", "milestone", "rc", "snapshot", "", "sp" ); + Arrays.asList( "alpha", "beta", "milestone", "preview", "rc", "snapshot", "", "sp" ); private static final Properties ALIASES = new Properties(); static { - ALIASES.put( "ga", "" ); + ALIASES.put( "cr", "rc" ); ALIASES.put( "final", "" ); + ALIASES.put( "ga", "" ); ALIASES.put( "release", "" ); - ALIASES.put( "cr", "rc" ); } Review Comment: not functional but makes the tag ordering intention clearer: RC < final, ga, release > 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)