]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-49
authorEdwin L. Punzalan <epunzalan@apache.org>
Thu, 1 Dec 2005 01:35:02 +0000 (01:35 +0000)
committerEdwin L. Punzalan <epunzalan@apache.org>
Thu, 1 Dec 2005 01:35:02 +0000 (01:35 +0000)
Submitted by: John Tolentino

Added Skeleton Unit Test

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

maven-repository-reports-standard/pom.xml
maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultArtifactReporter.java [new file with mode: 0644]
maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java [new file with mode: 0644]
maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java
pom.xml

index cdc02ed2e2f818e7cdaf79e259dbedeb64365554..1a9694da55c91ac810a51c0d97dd173e40ea052e 100755 (executable)
@@ -33,5 +33,9 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact-manager</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.repository</groupId>
+      <artifactId>maven-repository-discovery</artifactId>
+    </dependency>
   </dependencies>
 </project>
diff --git a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultArtifactReporter.java b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultArtifactReporter.java
new file mode 100644 (file)
index 0000000..114e560
--- /dev/null
@@ -0,0 +1,43 @@
+package org.apache.maven.repository.reporting;
+
+import org.apache.maven.repository.discovery.AbstractArtifactDiscoverer;
+import org.apache.maven.artifact.Artifact;
+
+import java.util.List;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/**
+ * @author <a href="mailto:jtolentino@mergere.com">John Tolentino</a>
+ */
+public class DefaultArtifactReporter
+    implements ArtifactReporter
+{
+
+    public void addFailure( Artifact artifact, String reason )
+    {
+    }
+
+    public void addSuccess( Artifact artifact )
+    {
+    }
+
+    public void addWarning( Artifact artifact, String message )
+    {
+    }
+}
diff --git a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java
new file mode 100644 (file)
index 0000000..b650ad6
--- /dev/null
@@ -0,0 +1,32 @@
+package org.apache.maven.repository.reporting;
+
+import org.apache.maven.artifact.Artifact;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author <a href="mailto:jtolentino@mergere.com">John Tolentino</a>
+ */
+public class DefaultRepositoryQueryLayer
+    implements RepositoryQueryLayer
+{
+    public boolean containsArtifact( Artifact artifact )
+    {
+        return true;
+    }
+}
index c4965a03b3a015c42416dae2ac8d2c1c44d0f46a..ab702b72d0f6ee540783a1951d8635d0637b7504 100644 (file)
@@ -26,5 +26,5 @@ public interface RepositoryQueryLayer
 {
     String ROLE = RepositoryQueryLayer.class.getName();
 
-    void containsArtifact( Artifact artifact );
+    boolean containsArtifact( Artifact artifact );
 }
diff --git a/pom.xml b/pom.xml
index b72d5ea34c674c5c4de4c0294781156072a51a37..e018ec3b5ca1f8fc56afbf2fccf5c9868b9ce353 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <artifactId>wagon-http-lightweight</artifactId>
         <version>1.0-alpha-5</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.maven.repository</groupId>
+        <artifactId>maven-repository-discovery</artifactId>
+        <version>${pom.version}</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
   <distributionManagement>