summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin L. Punzalan <epunzalan@apache.org>2006-06-06 03:46:40 +0000
committerEdwin L. Punzalan <epunzalan@apache.org>2006-06-06 03:46:40 +0000
commitcb6190c5adcae29d51fed6757a8ee96156ab744e (patch)
treea3d491220ee999487df59bee9d0f1b2f323b0fd1
parentc4364eebeadb84fce1f5d5cf3e01149090d7a557 (diff)
downloadarchiva-cb6190c5adcae29d51fed6757a8ee96156ab744e.tar.gz
archiva-cb6190c5adcae29d51fed6757a8ee96156ab744e.zip
PR: MRM-12
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
-rw-r--r--maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java2
-rw-r--r--maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java b/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java
index f0cc85e1e..05658e3ba 100644
--- a/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java
+++ b/maven-repository-utils/src/main/java/org/apache/maven/repository/ArtifactUtils.java
@@ -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();
diff --git a/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java b/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java
index cf7ae25d6..6c0576723 100644
--- a/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java
+++ b/maven-repository-utils/src/test/java/org/apache/maven/repository/ArtifactUtilsLegacyTest.java
@@ -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
{