1 package org.apache.maven.repository.reporting;
4 * Copyright 2005-2006 The Apache Software Foundation.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 import org.apache.maven.artifact.Artifact;
20 import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
22 import java.util.Iterator;
25 * This interface is used by the single artifact processor.
27 * The initial implementation of this will just need to be a mock implementation in src/test/java, used to track the
28 * failures and successes for checking assertions. Later, implementations will be made to present reports on the
29 * web interface, send them via mail, and so on.
31 public interface ArtifactReporter
33 String ROLE = ArtifactReporter.class.getName();
35 public static String NULL_MODEL = "Provided model was null";
37 public static String NULL_ARTIFACT = "Provided artifact was null";
39 public static String EMPTY_GROUP_ID = "Group id was empty or null";
41 public static String EMPTY_ARTIFACT_ID = "Artifact id was empty or null";
43 public static String EMPTY_VERSION = "Version was empty or null";
45 public static String EMPTY_DEPENDENCY_GROUP_ID = "Group id was empty or null";
47 public static String EMPTY_DEPENDENCY_ARTIFACT_ID = "Artifact id was empty or null";
49 public static String EMPTY_DEPENDENCY_VERSION = "Version was empty or null";
51 public static String NO_DEPENDENCIES = "Artifact has no dependencies";
53 public static String ARTIFACT_NOT_FOUND = "Artifact does not exist in the repository";
55 public static String DEPENDENCY_NOT_FOUND = "Artifact's dependency does not exist in the repository";
57 void addFailure( Artifact artifact, String reason );
59 void addSuccess( Artifact artifact );
61 void addWarning( Artifact artifact, String message );
63 void addFailure( RepositoryMetadata metadata, String reason );
65 void addSuccess( RepositoryMetadata metadata );
67 void addWarning( RepositoryMetadata metadata, String message );
69 Iterator getArtifactFailureIterator();
71 Iterator getArtifactSuccessIterator();
73 Iterator getArtifactWarningIterator();
75 Iterator getRepositoryMetadataFailureIterator();
77 Iterator getRepositoryMetadataSuccessIterator();
79 Iterator getRepositoryMetadataWarningIterator();