]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-42
authorEdwin L. Punzalan <epunzalan@apache.org>
Mon, 19 Dec 2005 03:04:49 +0000 (03:04 +0000)
committerEdwin L. Punzalan <epunzalan@apache.org>
Mon, 19 Dec 2005 03:04:49 +0000 (03:04 +0000)
Submitted by: Maria Odea Ching

Class for discovering repository metadata and fixed failing tests on DefaultArtifactDiscovererTest and LegacyArtifactDiscovererTest

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

maven-repository-discovery/pom.xml
maven-repository-discovery/src/main/resources/META-INF/plexus/components.xml
maven-repository-discovery/src/test/java/org/apache/maven/repository/discovery/DefaultArtifactDiscovererTest.java
maven-repository-discovery/src/test/java/org/apache/maven/repository/discovery/LegacyArtifactDiscovererTest.java
maven-repository-discovery/src/test/repository/org/apache/maven/some-ejb/1.0/maven-metadata-repository.xml [new file with mode: 0644]

index 651c4f4e225e7cca8f94f3ad15971cd60aae5739..8426562e3f3562c90421f14f3d20510a5b6bf6e5 100755 (executable)
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-repository-metadata</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact-manager</artifactId>
+    </dependency>
   </dependencies>
 </project>
index ceccd778afe1ce07500e93d2ae95110edb08b59d..3e8ef2c3929af33cac7a74b6bea5ce16b311d08a 100644 (file)
@@ -1,5 +1,11 @@
 <component-set>
   <components>
+    <component>
+       <role>org.apache.maven.repository.discovery.MetadataDiscoverer</role>
+       <role-hint>default</role-hint>
+       <implementation>org.apache.maven.repository.discovery.DefaultMetadataDiscoverer</implementation>
+       <instantiation-strategy>per-lookup</instantiation-strategy>
+    </component>    
     <component>
       <role>org.apache.maven.repository.discovery.ArtifactDiscoverer</role>
       <role-hint>legacy</role-hint>
@@ -11,7 +17,6 @@
         </requirement>
       </requirements>
     </component>
-
     <component>
       <role>org.apache.maven.repository.discovery.ArtifactDiscoverer</role>
       <role-hint>default</role-hint>
index 9027421247907c55f4bc6284d0e89a9338c77b5a..6d2ef2427e9d09aa686e528a897eb41ed9ca4696 100644 (file)
@@ -276,7 +276,7 @@ public class DefaultArtifactDiscovererTest
         assertNotNull( "Check artifacts not null", artifacts );
 
         assertTrue( "Check normal included",
-                    artifacts.contains( createArtifact( "org.apache.maven", "testing", "1.0", "java-source" ) ) );
+                    artifacts.contains( createArtifact( "org.apache.maven", "testing", "1.0", "java-source", "sources" ) ) );
     }
 
     public void testDistributionInclusion()
index 3798f9aeca2821e8ed086e089e9248c74e3b1be6..cf33067d6bdf744e5044a5643c43a618ee370711 100644 (file)
@@ -261,7 +261,7 @@ public class LegacyArtifactDiscovererTest
         assertNotNull( "Check artifacts not null", artifacts );
 
         assertTrue( "Check normal included",
-                    artifacts.contains( createArtifact( "org.apache.maven", "testing", "1.0", "java-source" ) ) );
+                    artifacts.contains( createArtifact( "org.apache.maven", "testing", "1.0", "java-source", "sources" ) ) );
     }
 
     public void testDistributionInclusion()
diff --git a/maven-repository-discovery/src/test/repository/org/apache/maven/some-ejb/1.0/maven-metadata-repository.xml b/maven-repository-discovery/src/test/repository/org/apache/maven/some-ejb/1.0/maven-metadata-repository.xml
new file mode 100644 (file)
index 0000000..e69de29