]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-12
authorEdwin L. Punzalan <epunzalan@apache.org>
Tue, 6 Jun 2006 03:46:40 +0000 (03:46 +0000)
committerEdwin L. Punzalan <epunzalan@apache.org>
Tue, 6 Jun 2006 03:46:40 +0000 (03:46 +0000)
Added "final" in the list of possible version contents

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@411984 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java
maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java

index f0cc85e1e38cf315ec934fad2764931accc3b039..05658e3bac865dc73ecb47cc470cea01b00835b8 100644 (file)
@@ -323,7 +323,7 @@ public class ArtifactUtils
                         "([Tt][Ee][Ss][Tt][_.0-9]*)|" + "([Dd][Ee][Bb][Uu][Gg][_.0-9]*)|" +
                         "([Uu][Nn][Oo][Ff][Ff][Ii][Cc][Ii][Aa][Ll][_.0-9]*)|" + "([Cc][Uu][Rr][Rr][Ee][Nn][Tt])|" +
                         "([Ll][Aa][Tt][Ee][Ss][Tt])|" + "([Ff][Cc][Ss])|" + "([Rr][Ee][Ll][Ee][Aa][Ss][Ee][_.0-9]*)|" +
-                        "([Nn][Ii][Gg][Hh][Tt][Ll][Yy])|" + "([AaBb][_.0-9]*)";
+                        "([Nn][Ii][Gg][Hh][Tt][Ll][Yy])|" + "[Ff][Ii][Nn][Aa][Ll]|" + "([AaBb][_.0-9]*)";
 
                     StringBuffer classifierBuffer = new StringBuffer();
                     StringBuffer versionBuffer = new StringBuffer();
index cf7ae25d6d62986be0aada492304d1f2d68ebe07..6c0576723c1b4aa0281c505441ccdd85ee9df98a 100644 (file)
@@ -76,6 +76,18 @@ public class ArtifactUtilsLegacyTest
         assertEquals( createArtifact( "org.apache.maven.test", "maven-model", "1.0-SNAPSHOT" ), artifact );
     }
 
+    public void testFinal()
+        throws ComponentLookupException
+    {
+        String testPath = "org.apache.maven.test/jars/maven-model-1.0-final-20060606.jar";
+
+        Artifact artifact = getArtifactFromPath( testPath );
+
+        assertNotNull( "Artifact path with invalid snapshot error", artifact );
+
+        assertEquals( createArtifact( "org.apache.maven.test", "maven-model", "1.0-final-20060606" ), artifact );
+    }
+
     public void testNormal()
         throws ComponentLookupException
     {