Permalink
Browse files

[maven-release-plugin] copy for tag nexus-indexer-1.0-beta-4.3

git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/tags/nexus-indexer-1.0-beta-4.3@705 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information...
1 parent e912962 commit 5b055c385ca41c27a39eeb37c52aa17a78324f23 mpowers committed Jul 16, 2008
View
@@ -8,7 +8,7 @@
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-indexer</artifactId>
- <version>1.0-beta-5.2-SNAPSHOT</version>
+ <version>1.0-beta-4.3</version>
<name>Sonatype Nexus: Indexer</name>
<licenses>
@@ -217,8 +217,8 @@
</build>
<scm>
- <connection>scm:svn:http://svn.sonatype.org/nexus/branches/nexus-indexer-1.0-beta-4.2</connection>
- <developerConnection>scm:svn:https://svn.sonatype.org/nexus/branches/nexus-indexer-1.0-beta-4.2</developerConnection>
- <url>http://svn.sonatype.org/nexus/branches/nexus-indexer-1.0-beta-4.2</url>
+ <connection>scm:svn:http://svn.sonatype.org/nexus/tags/nexus-indexer-1.0-beta-4.3</connection>
+ <developerConnection>scm:svn:https://svn.sonatype.org/nexus/tags/nexus-indexer-1.0-beta-4.3</developerConnection>
+ <url>http://svn.sonatype.org/nexus/tags/nexus-indexer-1.0-beta-4.3</url>
</scm>
</project>
@@ -13,6 +13,9 @@
*******************************************************************************/
package org.sonatype.nexus.artifact;
+/**
+ * @deprecated
+ */
public class M2ArtifactRecognizer {
/**
* Is this item M2 Checksum?
@@ -22,7 +25,7 @@ public static boolean isChecksum(String path) {
}
/**
- * Is this item M2 POM?
+ * Is this item M2 POM?
*/
public static boolean isPom(String path) {
return path.endsWith(".pom") || path.endsWith(".pom.sha1") || path.endsWith(".pom.md5");
@@ -167,21 +167,13 @@ else if ( s.endsWith( ".asc" ) )
+ ( ( v.length() > 9 ) ? ( v.substring( 0, v.length() - 9 ) + "-" ) : "" )
+ snapshotBuildNumber + "." + ext );
}
+
if ( !primary )
{
- if ( checksum || signature )
+ if ( vEndPos + a.length() + v.length() - "-SNAPSHOT".length() + 3 + snapshotBuildNumber.length()
+ < s.lastIndexOf( "." ) )
{
- c = s.substring(
- vEndPos + a.length() + v.length() - 9 + 3 + snapshotBuildNumber.length(),
- s.lastIndexOf( '.' ) );
- if ( c.length() == 0 )
- {
- c = null;
- }
- }
- else
- {
- c = s.substring( s.lastIndexOf( '-' ) + 1, s.lastIndexOf( '.' ) );
+ c = s.substring( s.lastIndexOf( '-' ) + 1, s.lastIndexOf( '.' ) );
}
}
@@ -408,6 +408,23 @@ public void testGav()
path = gavCalculator.gavToPath( gav );
assertEquals( "/org/apache/maven/artifact/maven-artifact/3.0-SNAPSHOT/maven-artifact-3.0-20080411.005221-75.pom.asc", path );
+ gav = gavCalculator.pathToGav( "/org/apache/maven/maven-core/2.0.9-SNAPSHOT/maven-core-2.0.9-20080302.032223-6-bin.zip.sha1" );
+ assertEquals( "org.apache.maven", gav.getGroupId() );
+ assertEquals( "maven-core", gav.getArtifactId() );
+ assertEquals( "2.0.9-20080302.032223-6", gav.getVersion() );
+ assertEquals( "2.0.9-SNAPSHOT", gav.getBaseVersion() );
+ assertEquals( "bin", gav.getClassifier() );
+ assertEquals( "zip", gav.getExtension() );
+ assertEquals( Integer.valueOf( 6 ), gav.getSnapshotBuildNumber() );
+ assertEquals( parseTimestamp( "20080302.032223" ), gav.getSnapshotTimeStamp() );
+ assertEquals( "maven-core-2.0.9-20080302.032223-6-bin.zip.sha1", gav.getName() );
+ assertEquals( true, gav.isSnapshot() );
+ assertEquals( true, gav.isHash() );
+ assertEquals( Gav.HashType.sha1, gav.getHashType() );
+
+ path = gavCalculator.gavToPath( gav );
+ assertEquals( "/org/apache/maven/maven-core/2.0.9-SNAPSHOT/maven-core-2.0.9-20080302.032223-6-bin.zip.sha1", path );
+
gav = gavCalculator.pathToGav( "/foo/artifact/SNAPSHOT/artifact-SNAPSHOT.jar" );
if ( enforcer.isStrict() )

0 comments on commit 5b055c3

Please sign in to comment.