]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1411] project information is missing if a POM could not be read correctly
authorMaria Odea B. Ching <oching@apache.org>
Thu, 16 Jun 2011 13:12:22 +0000 (13:12 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Thu, 16 Jun 2011 13:12:22 +0000 (13:12 +0000)
o for snapshot artifacts, get the timestamp and build number first from the metadata in the remote repo before proxying the actual parent pom
o added unit tests, removed checksums and other test files that are not necessarily used

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1136424 13f79535-47bb-0310-9956-ffa450edef68

18 files changed:
archiva-modules/archiva-base/archiva-configuration/pom.xml
archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml
archiva-modules/plugins/maven2-repository/pom.xml
archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/RepositoryModelResolver.java
archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryMetadataResolverTest.java
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar.md5 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar.sha1 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1 [deleted file]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom [new file with mode: 0644]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/maven-metadata.xml [new file with mode: 0644]
archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom [new file with mode: 0644]

index dac057cdf4613a563489d07397e49258ed91aeb7..56f50e2a8a43db370f57498336561b3b9a376f86 100644 (file)
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-policies</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>xmlunit</groupId>
       <artifactId>xmlunit</artifactId>
index 4a873d9f7e96b745c131f23b57eabea345112dfb..05ee9c993e88ee450b4319094fd4462c48bf43d6 100644 (file)
       <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>    
   </dependencies>
 </project>
index 0cdb52f3a3463f048ac23f2c168cdf6fb19afb34..e52227f96a2b70e3783270669ed221e7d8e8c98a 100644 (file)
     <dependency>
       <groupId>org.codehaus.redback</groupId>
       <artifactId>redback-system</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.redback</groupId>
+          <artifactId>plexus-spring</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus.registry</groupId>
+          <artifactId>plexus-registry-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus.registry</groupId>
+          <artifactId>plexus-registry-commons</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>net.sf.ehcache</groupId>
+          <artifactId>ehcache</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus.cache</groupId>
+          <artifactId>plexus-cache-ehcache</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus.cache</groupId>
+          <artifactId>plexus-cache-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-component-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
       <groupId>org.codehaus.redback</groupId>
       <artifactId>redback-authorization-rbac</artifactId>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>net.sf.ehcache</groupId>
+          <artifactId>ehcache</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus.cache</groupId>
+          <artifactId>plexus-cache-ehcache</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus.cache</groupId>
+          <artifactId>plexus-cache-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.codehaus.redback</groupId>
index ae853c990d0277c4c473c4c02e5019bd2ab969d9..6c4df0d8a862f79ed10271c46bc4aa87a8af4cf2 100644 (file)
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-provider-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>
     <!-- TODO: aim to remove this dependency -->
     <dependency>
       <groupId>org.apache.archiva</groupId>
index 28a86a67b0ee0edb07d27005ed165e6b5357e164..f0df57fef2fddd2cbe86a9fa9c99ec6175626b2c 100644 (file)
@@ -29,8 +29,10 @@ import org.apache.archiva.proxy.common.WagonFactory;
 import org.apache.archiva.proxy.common.WagonFactoryException;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.maven.archiva.common.utils.VersionUtil;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
+import org.apache.maven.archiva.xml.XMLException;
 import org.apache.maven.model.Repository;
 import org.apache.maven.model.building.FileModelSource;
 import org.apache.maven.model.building.ModelSource;
@@ -63,6 +65,8 @@ public class RepositoryModelResolver
 
     private static final Logger log = LoggerFactory.getLogger( RepositoryModelResolver.class );
 
+    private static final String METADATA_FILENAME = "maven-metadata.xml";
+
     // key/value: remote repo ID/network proxy
     Map<String, ProxyInfo> networkProxyMap;
 
@@ -139,7 +143,8 @@ public class RepositoryModelResolver
     // because it's causing a cyclic dependency
     private boolean getModelFromProxy( RemoteRepositoryConfiguration remoteRepository, String groupId,
                                     String artifactId, String version, String filename )
-        throws AuthorizationException, TransferFailedException, ResourceDoesNotExistException, WagonFactoryException
+        throws AuthorizationException, TransferFailedException, ResourceDoesNotExistException, WagonFactoryException,
+        XMLException
     {
         boolean success = false;
         File tmpMd5 = null;
@@ -167,8 +172,39 @@ public class RepositoryModelResolver
                 {
                     tmpResource = new File( workingDirectory, filename );
 
+                    if ( VersionUtil.isSnapshot( version ) )
+                    {
+                        // get the metadata first!
+                        File tmpMetadataResource = new File( workingDirectory, METADATA_FILENAME );
+
+                        String metadataPath = StringUtils.substringBeforeLast( artifactPath, "/" ) + "/" + METADATA_FILENAME;
+
+                        wagon.get( metadataPath, tmpMetadataResource );
+
+                        log.debug( "Successfully downloaded metadata." );
+
+                        MavenRepositoryMetadata metadata = MavenRepositoryMetadataReader.read( tmpMetadataResource );
+
+                        // re-adjust to timestamp if present, otherwise retain the original -SNAPSHOT filename
+                        MavenRepositoryMetadata.Snapshot snapshotVersion = metadata.getSnapshotVersion();
+                        String timestampVersion = version;
+                        if ( snapshotVersion != null )
+                        {
+                            timestampVersion =
+                                timestampVersion.substring( 0, timestampVersion.length() - 8 ); // remove SNAPSHOT from end
+                            timestampVersion =
+                                timestampVersion + snapshotVersion.getTimestamp() + "-" + snapshotVersion.getBuildNumber();
+
+                            filename = artifactId + "-" + timestampVersion + ".pom";
+
+                            artifactPath = pathTranslator.toPath( groupId, artifactId, version, filename );
+
+                            log.debug( "New artifactPath : " + artifactPath );
+                        }
+                    }
+
                     log.info( "Retrieving " + artifactPath + " from " + remoteRepository.getName() );
-                    
+
                     wagon.get( artifactPath, tmpResource );
 
                     log.debug( "Downloaded successfully." );
index 03b8dd5a8be47c9c89082b480f6d716f6a5f0ae6..80e00935e6f2d888b54dcc5d1ee4ff7f6ec12982 100644 (file)
@@ -450,7 +450,8 @@ public class Maven2RepositoryMetadataResolverTest
     public void testGetProjectVersionMetadataWithParentSuccessful()
         throws Exception
     {
-        copyTestArtifactWithParent();
+        copyTestArtifactWithParent( "target/test-classes/com/example/test/test-artifact-module-a",
+                                    "target/test-repository/com/example/test/test-artifact-module-a" );
 
         ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( TEST_REPO_ID, "com.example.test",
                                                                                "test-artifact-module-a", "1.0" );
@@ -480,7 +481,12 @@ public class Maven2RepositoryMetadataResolverTest
         assertDependency( dependencies.get( 0 ), "commons-io", "commons-io", "1.4" );
         assertDependency( dependencies.get( 1 ), "junit", "junit", "3.8.1", "test" );
 
-        deleteTestArtifactWithParent();
+        List<String> paths = new ArrayList<String>();
+        paths.add( "target/test-repository/com/example/test/test-artifact-module-a" );
+        paths.add( "target/test-repository/com/example/test/test-artifact-parent" );
+        paths.add( "target/test-repository/com/example/test/test-artifact-root" );
+
+        deleteTestArtifactWithParent( paths );
     }
 
     @Test
@@ -494,7 +500,8 @@ public class Maven2RepositoryMetadataResolverTest
 
         configuration.save( config );
 
-        copyTestArtifactWithParent();
+        copyTestArtifactWithParent( "target/test-classes/com/example/test/test-artifact-module-a",
+                                    "target/test-repository/com/example/test/test-artifact-module-a" );
 
         ProjectVersionMetadata metadata =  storage.readProjectVersionMetadata( TEST_REPO_ID, "com.example.test",
                                                                 "test-artifact-module-a", "1.0" );
@@ -506,14 +513,20 @@ public class Maven2RepositoryMetadataResolverTest
         assertEquals( "test-artifact-module-a", facet.getArtifactId() );
         assertEquals( "jar", facet.getPackaging() );
 
-        deleteTestArtifactWithParent();
+        List<String> paths = new ArrayList<String>();
+        paths.add( "target/test-repository/com/example/test/test-artifact-module-a" );
+        paths.add( "target/test-repository/com/example/test/test-artifact-parent" );
+        paths.add( "target/test-repository/com/example/test/test-artifact-root" );
+
+        deleteTestArtifactWithParent( paths );
     }
 
     @Test
     public void testGetProjectVersionMetadataWithParentNotInAnyRemoteRepo()
          throws Exception
     {
-        copyTestArtifactWithParent();
+        copyTestArtifactWithParent( "target/test-classes/com/example/test/test-artifact-module-a",
+                                    "target/test-repository/com/example/test/test-artifact-module-a" );
 
         ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( TEST_REPO_ID, "com.example.test", "missing-parent", "1.1" );
 
@@ -525,7 +538,53 @@ public class Maven2RepositoryMetadataResolverTest
         assertEquals( "missing-parent", facet.getArtifactId() );
         assertEquals( "jar", facet.getPackaging() );
 
-        deleteTestArtifactWithParent();
+        List<String> paths = new ArrayList<String>();
+        paths.add( "target/test-repository/com/example/test/test-artifact-module-a" );
+        paths.add( "target/test-repository/com/example/test/test-artifact-parent" );
+        paths.add( "target/test-repository/com/example/test/test-artifact-root" );
+
+        deleteTestArtifactWithParent( paths );
+    }
+
+    @Test
+    public void testGetProjectVersionMetadataWithParentSnapshotVersion()
+        throws Exception
+    {
+        copyTestArtifactWithParent( "target/test-classes/com/example/test/test-snapshot-artifact-module-a",
+                                    "target/test-repository/com/example/test/test-snapshot-artifact-module-a" );
+
+        ProjectVersionMetadata metadata = storage.readProjectVersionMetadata( TEST_REPO_ID, "com.example.test",
+                                                                               "test-snapshot-artifact-module-a", "1.1-SNAPSHOT" );
+
+        MavenProjectFacet facet = (MavenProjectFacet) metadata.getFacet( MavenProjectFacet.FACET_ID );
+        assertEquals( "jar", facet.getPackaging() );
+        assertEquals( "com.example.test", facet.getParent().getGroupId() );
+        assertEquals( "test-snapshot-artifact-root", facet.getParent().getArtifactId() );
+        assertEquals( "1.1-SNAPSHOT", facet.getParent().getVersion() );
+        assertEquals( "test-snapshot-artifact-module-a", facet.getArtifactId() );
+        assertEquals( "com.example.test", facet.getGroupId() );
+        assertNull( metadata.getCiManagement() );
+        assertNotNull( metadata.getDescription() );
+
+        checkApacheLicense( metadata );
+
+        assertEquals( "1.1-SNAPSHOT", metadata.getId() );
+        assertEquals( "Test Snapshot Artifact :: Module A", metadata.getName() );
+        String path = "test-snapshot-artifact/trunk/test-snapshot-artifact-module-a";
+        assertEquals( TEST_SCM_CONN_BASE + path, metadata.getScm().getConnection() );
+        assertEquals( TEST_SCM_DEV_CONN_BASE + path, metadata.getScm().getDeveloperConnection() );
+        assertEquals( TEST_SCM_URL_BASE + path, metadata.getScm().getUrl() );
+
+        List<Dependency> dependencies = metadata.getDependencies();
+        assertEquals( 2, dependencies.size() );
+        assertDependency( dependencies.get( 0 ), "commons-io", "commons-io", "1.4" );
+        assertDependency( dependencies.get( 1 ), "junit", "junit", "3.8.1", "test" );
+
+        List<String> paths = new ArrayList<String>();
+        paths.add( "target/test-repository/com/example/test/test-snapshot-artifact-module-a" );
+        paths.add( "target/test-repository/com/example/test/test-snapshot-artifact-root" );
+
+        deleteTestArtifactWithParent( paths );
     }
 
     // Tests for MRM-1411 - END
@@ -735,9 +794,16 @@ public class Maven2RepositoryMetadataResolverTest
         assertEquals( "http://www.apache.org/", metadata.getOrganization().getUrl() );
     }
 
-    private void deleteTestArtifactWithParent()
+    private void deleteTestArtifactWithParent( List<String> pathsToBeDeleted )
          throws IOException
     {
+        for( String path : pathsToBeDeleted )
+        {
+            File dir =  new File( FileUtil.getBasedir(), path );
+            FileUtils.deleteDirectory( dir );
+
+            assertFalse( dir.exists() );
+        }
         File dest = new File( FileUtil.getBasedir(), "target/test-repository/com/example/test/test-artifact-module-a" );
         File parentPom = new File( FileUtil.getBasedir(), "target/test-repository/com/example/test/test-artifact-parent" );
         File rootPom = new File( FileUtil.getBasedir(), "target/test-repository/com/example/test/test-artifact-root" );
@@ -751,11 +817,11 @@ public class Maven2RepositoryMetadataResolverTest
         assertFalse( rootPom.exists() );
     }
 
-    private File copyTestArtifactWithParent()
+    private File copyTestArtifactWithParent( String srcPath, String destPath )
          throws IOException
     {
-        File src = new File( FileUtil.getBasedir(), "target/test-classes/com/example/test/test-artifact-module-a" );
-        File dest = new File( FileUtil.getBasedir(), "target/test-repository/com/example/test/test-artifact-module-a" );
+        File src = new File( FileUtil.getBasedir(), srcPath );
+        File dest = new File( FileUtil.getBasedir(), destPath );
 
         FileUtils.copyDirectory( src, dest );
         assertTrue( dest.exists() );
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar
deleted file mode 100644 (file)
index 3176aff..0000000
Binary files a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar and /dev/null differ
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar.md5 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar.md5
deleted file mode 100644 (file)
index 877b697..0000000
+++ /dev/null
@@ -1 +0,0 @@
-37786de9e272ed6db8541855e0e2d5dc
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar.sha1 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.jar.sha1
deleted file mode 100644 (file)
index 7f1a38e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bb1ca7834422926d0cb79ef303b715bc17f41661
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.md5
deleted file mode 100644 (file)
index 0a2d5c3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-61a4d030260fc6bee0681cf99ba54674
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-module-a/1.0/test-artifact-module-a-1.0.pom.sha1
deleted file mode 100644 (file)
index 9b05237..0000000
+++ /dev/null
@@ -1 +0,0 @@
-6f54bc4223bc39d7880420f66baa3a24d7f9c181
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.md5
deleted file mode 100644 (file)
index 61e2b6b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-92c60efe85e23fe5afd8a854cea87209
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-parent/1/test-artifact-parent-1.pom.sha1
deleted file mode 100644 (file)
index 6eae228..0000000
+++ /dev/null
@@ -1 +0,0 @@
-6eca3509acf66023c29e2bc17f73e79d1d1a341a
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.md5
deleted file mode 100644 (file)
index 809d19e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-034449f8696981edce2485b841a02a47
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1 b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-artifact-root/1.0/test-artifact-root-1.0.pom.sha1
deleted file mode 100644 (file)
index 0de5db2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bef26aec1a0714cec7fa56cdbb7ebcdb452295eb
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-module-a/1.1-SNAPSHOT/test-snapshot-artifact-module-a-1.1-SNAPSHOT.pom
new file mode 100644 (file)
index 0000000..8250e90
--- /dev/null
@@ -0,0 +1,18 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.example.test</groupId>
+    <artifactId>test-snapshot-artifact-root</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+  <artifactId>test-snapshot-artifact-module-a</artifactId>
+  <packaging>jar</packaging>
+  <name>Test Snapshot Artifact :: Module A</name>
+  <dependencies>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/maven-metadata.xml b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/maven-metadata.xml
new file mode 100644 (file)
index 0000000..8fa2f8f
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>com.example.test</groupId>
+  <artifactId>test-snapshot-artifact-root</artifactId>
+  <version>1.1-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <timestamp>20100310.014828</timestamp>
+      <buildNumber>2</buildNumber>
+    </snapshot>
+    <lastUpdated>20100310014828</lastUpdated>
+  </versioning>
+</metadata>
diff --git a/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom b/archiva-modules/plugins/maven2-repository/src/test/resources/com/example/test/test-snapshot-artifact-root/1.1-SNAPSHOT/test-snapshot-artifact-root-1.1-20100310.014828-2.pom
new file mode 100644 (file)
index 0000000..75fe8be
--- /dev/null
@@ -0,0 +1,39 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.example.test</groupId>
+    <artifactId>test-artifact-parent</artifactId>
+    <version>1</version>
+  </parent>
+  <artifactId>test-snapshot-artifact-root</artifactId>
+  <version>1.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>Test Snapshot Artifact :: Root</name>
+  <description>This is the Test project.</description>
+  <modules>
+    <module>test-snapshot-artifact-module-a</module>
+  </modules>
+  <scm>
+    <connection>scm:svn:http://svn.example.com/repos/test-snapshot-artifact/trunk</connection>
+    <developerConnection>scm:svn:https://svn.example.com/repos/test-snapshot-artifact/trunk</developerConnection>
+    <url>http://svn.example.com/repos/test-snapshot-artifact/trunk</url>
+  </scm>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>commons-io</groupId>
+        <artifactId>commons-io</artifactId>
+        <version>1.4</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>