Permalink
Browse files

[NEXUS-2074] release artifact should start with '<artifactId>-<versio…

…n>.' or '<artifactId>-<version>-'

git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-indexer-1.2.X@4219 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information...
juven
juven committed May 21, 2009
1 parent 1992f38 commit 967d5d2334bec555649473dc5567776a07c56ba4
@@ -110,7 +110,8 @@ private Gav getReleaseGav(String s, int vEndPos, String groupId,
boolean signature, Gav.HashType checksumType,
Gav.SignatureType signatureType)
{
- if ( !fileName.startsWith( artifactId + "-" + version ) )
+ if ( !fileName.startsWith( artifactId + "-" + version + "." )
+ && !fileName.startsWith( artifactId + "-" + version + "-" ) )
{
return null;
}
@@ -553,6 +553,9 @@ public void testGavExtreme()
gav = gavCalculator.pathToGav( "org/apache/maven/scm/maven-scm" );
assertEquals( null, gav );
+
+ gav = gavCalculator.pathToGav( "org/apache/geronimo/javamail/geronimo-javamail_1.4_mail" );
+ assertEquals( null, gav );
}
public void testIssueNexus57()

0 comments on commit 967d5d2

Please sign in to comment.