From f0fcef7e670ad64e55f37edcb723311ef49d323b Mon Sep 17 00:00:00 2001 From: Herve Boutemy Date: Sun, 17 Jan 2010 17:31:30 +0000 Subject: [PATCH] [MNG-2281] 1.0-beta-3 should be < 1.0-SNAPSHOT git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@900164 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/artifact/versioning/ComparableVersion.java | 2 +- .../maven/artifact/versioning/ComparableVersionTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java index 3f36455ef6..cf617d662d 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java @@ -145,7 +145,7 @@ public class ComparableVersion private static class StringItem implements Item { - private final static String[] QUALIFIERS = { "snapshot", "alpha", "beta", "milestone", "rc", "", "sp" }; + private final static String[] QUALIFIERS = { "alpha", "beta", "milestone", "rc", "snapshot", "", "sp" }; private final static List _QUALIFIERS = Arrays.asList( QUALIFIERS ); diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java index 71f27ff8c1..d5d7badc66 100644 --- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java +++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java @@ -39,8 +39,8 @@ public class ComparableVersionTest } private static final String[] VERSIONS_QUALIFIER = - { "1-SNAPSHOT", "1-alpha2snapshot", "1-alpha2", "1-alpha-123", "1-beta-2", "1-beta123", "1-m2", "1-m11", - "1-rc", "1-cr2", "1-rc123", "1", "1-sp", "1-sp2", "1-sp123", "1-abc", "1-def", "1-pom-1", "1-1-snapshot", + { "1-alpha2snapshot", "1-alpha2", "1-alpha-123", "1-beta-2", "1-beta123", "1-m2", "1-m11", "1-rc", "1-cr2", + "1-rc123", "1-SNAPSHOT", "1", "1-sp", "1-sp2", "1-sp123", "1-abc", "1-def", "1-pom-1", "1-1-snapshot", "1-1", "1-2", "1-123" }; private static final String[] VERSIONS_NUMBER = @@ -161,7 +161,7 @@ public class ComparableVersionTest checkVersionsOrder( "1.0-alpha-1", "1.0-alpha-2" ); checkVersionsOrder( "1.0-alpha-1", "1.0-beta-1" ); - checkVersionsOrder( "1.0-SNAPSHOT", "1.0-beta-1" ); + checkVersionsOrder( "1.0-beta-1", "1.0-SNAPSHOT" ); checkVersionsOrder( "1.0-SNAPSHOT", "1.0" ); checkVersionsOrder( "1.0-alpha-1-SNAPSHOT", "1.0-alpha-1" );