[
https://issues.apache.org/jira/browse/MNG-7559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17633348#comment-17633348
]
ASF GitHub Bot commented on MNG-7559:
-------------------------------------
elharo commented on code in PR #331:
URL: https://github.com/apache/maven-site/pull/331#discussion_r1020915748
##########
content/apt/pom.apt.vm:
##########
@@ -515,7 +515,18 @@ mvn install:install-file -Dfile=non-maven-proj.jar
-DgroupId=some.group -Dartifa
* the "<<<alpha>>>", "<<<beta>>>" and "<<<milestone>>>" qualifiers can
respectively be shortened to "a", "b" and "m" when directly followed by a
number.
- * else "<<<.qualifier>>>" \< "<<<-qualifier>>>" \< "<<<-number>>>" \<
"<<<.number>>>"
+ * else "<<<.qualifier>>>" = "<<<-qualifier>>>" \< "<<<-number>>>" \<
"<<<.number>>>"
+
+ * <<<alpha>>> = <<<a>>> < <<<beta>>> = <<<b>>> < <<<ea>>> < <<<milestone>>>
= <<<m>>> < <<<preview>>> < <<<rc>>> = <<<cr>>> < <<<snapshot>>> < '<<<>>>' =
<<<final>>> = <<<ga>>> = <<<release>>> \< <<<sp>>>
Review Comment:
ea and preview are new here, not previously mentioned. Were they already
handled like this in the code?
If not, this is new behavior that risks breaking builds.
##########
content/apt/pom.apt.vm:
##########
@@ -515,7 +515,18 @@ mvn install:install-file -Dfile=non-maven-proj.jar
-DgroupId=some.group -Dartifa
* the "<<<alpha>>>", "<<<beta>>>" and "<<<milestone>>>" qualifiers can
respectively be shortened to "a", "b" and "m" when directly followed by a
number.
- * else "<<<.qualifier>>>" \< "<<<-qualifier>>>" \< "<<<-number>>>" \<
"<<<.number>>>"
+ * else "<<<.qualifier>>>" = "<<<-qualifier>>>" \< "<<<-number>>>" \<
"<<<.number>>>"
+
+ * <<<alpha>>> = <<<a>>> < <<<beta>>> = <<<b>>> < <<<ea>>> < <<<milestone>>>
= <<<m>>> < <<<preview>>> < <<<rc>>> = <<<cr>>> < <<<snapshot>>> < '<<<>>>' =
<<<final>>> = <<<ga>>> = <<<release>>> \< <<<sp>>>
+
+ []
+
+ Following semver rules is encouraged, and some qualifiers are discouraged:
+ * Prefer '<<<alpha>>>', '<<<beta>>>' and '<<<milestone>>>' qualifiers over
'<<<ea>>>' and '<<<preview>>>'.
+ * Prefer '<<<1.0.0-RC1>>>'' over '<<<1.0.0.RC1>>>'.
+ * The usage of '<<<CR>>>' qualifier is discouraged. Use '<<<RC>>>' instead.
+ * The usage of '<<<final>>>', '<<<ga>>>' and '<<<release>>>' qualifiers is
discouraged. Use no qualifier instead.
Review Comment:
comma before and
##########
content/apt/pom.apt.vm:
##########
@@ -515,7 +515,18 @@ mvn install:install-file -Dfile=non-maven-proj.jar
-DgroupId=some.group -Dartifa
* the "<<<alpha>>>", "<<<beta>>>" and "<<<milestone>>>" qualifiers can
respectively be shortened to "a", "b" and "m" when directly followed by a
number.
- * else "<<<.qualifier>>>" \< "<<<-qualifier>>>" \< "<<<-number>>>" \<
"<<<.number>>>"
+ * else "<<<.qualifier>>>" = "<<<-qualifier>>>" \< "<<<-number>>>" \<
"<<<.number>>>"
+
+ * <<<alpha>>> = <<<a>>> < <<<beta>>> = <<<b>>> < <<<ea>>> < <<<milestone>>>
= <<<m>>> < <<<preview>>> < <<<rc>>> = <<<cr>>> < <<<snapshot>>> < '<<<>>>' =
<<<final>>> = <<<ga>>> = <<<release>>> \< <<<sp>>>
+
+ []
+
+ Following semver rules is encouraged, and some qualifiers are discouraged:
+ * Prefer '<<<alpha>>>', '<<<beta>>>' and '<<<milestone>>>' qualifiers over
'<<<ea>>>' and '<<<preview>>>'.
+ * Prefer '<<<1.0.0-RC1>>>'' over '<<<1.0.0.RC1>>>'.
+ * The usage of '<<<CR>>>' qualifier is discouraged. Use '<<<RC>>>' instead.
+ * The usage of '<<<final>>>', '<<<ga>>>' and '<<<release>>>' qualifiers is
discouraged. Use no qualifier instead.
+ * The usage of '<<<SP>>>' qualifier is discouraged. Use version increment
instead.
Review Comment:
Use version increment instead. --> Increment the patch version instead.
> 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)