Thomas-Bergmann commented on code in PR #929:
URL: https://github.com/apache/maven/pull/929#discussion_r1121421815


##########
maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java:
##########
@@ -346,4 +342,22 @@ public void testReuse() {
 
         assertEquals(c1, c2, "reused instance should be equivalent to new 
instance");
     }
+
+    /**
+     * Test <a 
href="https://issues.apache.org/jira/browse/MNG-7559";>MNG-7559</a> edge cases
+     * 1.0.0.RC1 < 1.0.0-RC2
+     * -pfd < final, ga, release
+     * 2.0.1.MR < 2.0.1
+     * 9.4.1.jre16 > 9.4.1.jre16-preview
+     */
+    @Test
+    public void testMng7559() {
+        checkVersionsOrder("1.0.0.RC1", "1.0.0-RC2");
+        checkVersionsOrder("4.0.0.Beta3", "4.0.0-RC2");
+        checkVersionsOrder("2.3-pfd", "2.3");
+        checkVersionsOrder("2.0.1.MR", "2.0.1");
+        checkVersionsOrder("9.4.1.jre16-preview", "9.4.1.jre16");
+        checkVersionsEqual("2.0.a", "2.0.0.a"); // previously ordered, now 
equals
+        checkVersionsOrder("1-sp-1", "1-ga-1"); // proving website 
documentation right.

Review Comment:
   According to the test `checkVersionsOrder("9.4.1.jre16-preview", 
"9.4.1.jre16");`
   Is there a feature wish to support "filters" inside the version extension 
like "jre\d+"? I assume, the specification of version number must be adapted 
for that, because it's not the idea of "jre17" is later or better than a "jdk8" 
release. It's just the same release for another platform.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to