From 233c55e0dc45a72ec953e137312a8eda1e0a32a9 Mon Sep 17 00:00:00 2001 From: "Edwin L. Punzalan" Date: Thu, 1 Dec 2005 01:35:02 +0000 Subject: [PATCH] PR: MRM-49 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 | 4 ++ .../reporting/DefaultArtifactReporter.java | 43 +++++++++++++++++++ .../DefaultRepositoryQueryLayer.java | 32 ++++++++++++++ .../reporting/RepositoryQueryLayer.java | 2 +- pom.xml | 5 +++ 5 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultArtifactReporter.java create mode 100644 maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java diff --git a/maven-repository-reports-standard/pom.xml b/maven-repository-reports-standard/pom.xml index cdc02ed2e..1a9694da5 100755 --- a/maven-repository-reports-standard/pom.xml +++ b/maven-repository-reports-standard/pom.xml @@ -33,5 +33,9 @@ org.apache.maven maven-artifact-manager + + org.apache.maven.repository + maven-repository-discovery + 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 index 000000000..114e56086 --- /dev/null +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultArtifactReporter.java @@ -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 John Tolentino + */ +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 index 000000000..b650ad62b --- /dev/null +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java @@ -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 John Tolentino + */ +public class DefaultRepositoryQueryLayer + implements RepositoryQueryLayer +{ + public boolean containsArtifact( Artifact artifact ) + { + return true; + } +} diff --git a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java index c4965a03b..ab702b72d 100644 --- a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java @@ -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 b72d5ea34..e018ec3b5 100644 --- a/pom.xml +++ b/pom.xml @@ -184,6 +184,11 @@ wagon-http-lightweight 1.0-alpha-5 + + org.apache.maven.repository + maven-repository-discovery + ${pom.version} + -- 2.39.5