[
https://issues.apache.org/jira/browse/MNG-7559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17651646#comment-17651646
]
ASF GitHub Bot commented on MNG-7559:
-------------------------------------
sultan commented on PR #929:
URL: https://github.com/apache/maven/pull/929#issuecomment-1363919683
> This is quite ugly, if you can host the repo on corporate Nexus. I have
the feeling that SemVer 2.0 is not ideally suited for Maven.
we might not be able to be fully SemVer 2.0 compatible because of legacy
artifacts that were there before SemVer 1.0 was even defined. so if we cant be
semver 2 compatible, why not borrow the + sign? or any other sign to
distinguish between natural ordering from maven custom ordering.
there is surely a good reason for the expected behaviour, but i seem to lack
the understanding and i'm not sure i can suggest a valid solution until the
expected result is formalized
* what is the purpose of the Sonatype qualifier?
* how do we order things when several companies add their own name?
* can a company do a release in an artifactid folder owned by another
company?
> 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
> Fix For: 4.x / Backlog
>
> 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)