From ecdba7fcc4833e93848e28983cb64d674d63c815 Mon Sep 17 00:00:00 2001 From: "Edwin L. Punzalan" Date: Tue, 29 Nov 2005 10:22:35 +0000 Subject: [PATCH] PR: MRM-31 Submitted by: Ma. Odea Ching created interfaces for the reporting apis git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@349697 13f79535-47bb-0310-9956-ffa450edef68 --- maven-repository-reports-standard/pom.xml | 4 +++ .../reporting/ArtifactReportProcessor.java | 28 +++++++++++++++++ .../reporting/ArtifactReporter.java | 30 +++++++++++++++++++ .../reporting/MetadataReportProcessor.java | 27 +++++++++++++++++ .../reporting/RepositoryQueryLayer.java | 27 +++++++++++++++++ pom.xml | 5 ++++ 6 files changed, 121 insertions(+) create mode 100644 maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReportProcessor.java create mode 100644 maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java create mode 100644 maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java create mode 100644 maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java diff --git a/maven-repository-reports-standard/pom.xml b/maven-repository-reports-standard/pom.xml index cab1772aa..cdc02ed2e 100755 --- a/maven-repository-reports-standard/pom.xml +++ b/maven-repository-reports-standard/pom.xml @@ -29,5 +29,9 @@ org.apache.maven maven-repository-metadata + + org.apache.maven + maven-artifact-manager + diff --git a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReportProcessor.java b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReportProcessor.java new file mode 100644 index 000000000..836e1132b --- /dev/null +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReportProcessor.java @@ -0,0 +1,28 @@ +package org.apache.maven.repository.reporting; + +/* + * 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. + */ + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.model.Model; + +public interface ArtifactReportProcessor +{ + String ROLE = ArtifactReportProcessor.class.getName(); + + void processArtifact( Model model, Artifact artifact, ArtifactReporter reporter ); +} diff --git a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java new file mode 100644 index 000000000..a916ba0c2 --- /dev/null +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java @@ -0,0 +1,30 @@ +package org.apache.maven.repository.reporting; + +/* + * 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. + */ + +import org.apache.maven.artifact.Artifact; + +public interface ArtifactReporter +{ + String ROLE = ArtifactReporter.class.getName(); + + void addFailure( Artifact artifact, String reason ); + + void addSuccess( Artifact artifact ); + + void addWarning( Artifact artifact, String message ); +} diff --git a/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java new file mode 100644 index 000000000..ae5328885 --- /dev/null +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java @@ -0,0 +1,27 @@ +package org.apache.maven.repository.reporting; + +/* + * 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. + */ + +import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; + +public interface MetadataReportProcessor +{ + String ROLE = MetadataReportProcessor.class.getName(); + + void processMetadata( RepositoryMetadata metadata, ArtifactReporter reporter ); +} 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 new file mode 100644 index 000000000..2de686792 --- /dev/null +++ b/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayer.java @@ -0,0 +1,27 @@ +package org.apache.maven.repository.reporting; + +/* + * 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. + */ + +import org.apache.maven.artifact.Artifact; + +public interface RepositoryQueryLayer +{ + String ROLE = RepositoryQueryLayer.class.getName(); + + void containsArtifact( Artifact artifact ); +} diff --git a/pom.xml b/pom.xml index 6158c2f46..ba9343336 100644 --- a/pom.xml +++ b/pom.xml @@ -157,6 +157,11 @@ maven-artifact 2.0.1-SNAPSHOT + + org.apache.maven + maven-artifact-manager + 2.0.1-SNAPSHOT + org.apache.maven.wagon wagon-provider-api