]> source.dussan.org Git - archiva.git/commitdiff
[MRM-161] some reporting clean up
authorBrett Porter <brett@apache.org>
Tue, 5 Sep 2006 04:45:59 +0000 (04:45 +0000)
committerBrett Porter <brett@apache.org>
Tue, 5 Sep 2006 04:45:59 +0000 (04:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@440257 13f79535-47bb-0310-9956-ffa450edef68

13 files changed:
archiva-converter/src/test/java/org/apache/maven/archiva/converter/RepositoryConverterTest.java
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/ArtifactReporter.java
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessor.java
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/DefaultArtifactReporter.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/ArtifactReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/ArtifactReporterTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/ChecksumArtifactReporterTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/DefaultArtifactReporterTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/DuplicateArtifactFileReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/InvalidPomArtifactReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/LocationArtifactReportProcessorTest.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/MockArtifactReporter.java [deleted file]

index a1fdd0f692964d9b5808bf92ffb2db6f26c292d5..fd957e46a18ed82c304ad7adc4714a5c49ac6c2c 100644 (file)
@@ -282,9 +282,9 @@ public class RepositoryConverterTest
         versionMetadataFile.delete();
 
         repositoryConverter.convert( artifact, targetRepository, reporter );
-        assertEquals( "check no errors", 0, reporter.getFailures() );
-        assertEquals( "check number of warnings", 2, reporter.getWarnings() );
-        assertEquals( "check success", 1, reporter.getSuccesses() );
+        assertEquals( "check no errors", 0, reporter.getNumFailures() );
+        assertEquals( "check number of warnings", 2, reporter.getNumWarnings() );
+        assertEquals( "check success", 1, reporter.getNumSuccesses() );
 
         File artifactFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) );
         assertTrue( "Check artifact created", artifactFile.exists() );
@@ -453,9 +453,9 @@ public class RepositoryConverterTest
 
         Artifact artifact = createArtifact( "test", "noPomArtifact", "1.0.0" );
         repositoryConverter.convert( artifact, targetRepository, reporter );
-        assertEquals( "check no errors", 0, reporter.getFailures() );
-        assertEquals( "check no warnings", 1, reporter.getWarnings() );
-        assertEquals( "check success", 1, reporter.getSuccesses() );
+        assertEquals( "check no errors", 0, reporter.getNumFailures() );
+        assertEquals( "check no warnings", 1, reporter.getNumWarnings() );
+        assertEquals( "check success", 1, reporter.getNumSuccesses() );
         assertEquals( "check warning message", getI18nString( "warning.missing.pom" ), getWarning().getReason() );
 
         File artifactFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) );
@@ -733,9 +733,9 @@ public class RepositoryConverterTest
         artifacts.add( createArtifact( "test", "artifact-two", "1.0.0" ) );
         artifacts.add( createArtifact( "test", "artifact-three", "1.0.0" ) );
         repositoryConverter.convert( artifacts, targetRepository, reporter );
-        assertEquals( "check no errors", 0, reporter.getFailures() );
-        assertEquals( "check no warnings", 0, reporter.getWarnings() );
-        assertEquals( "check successes", 3, reporter.getSuccesses() );
+        assertEquals( "check no errors", 0, reporter.getNumFailures() );
+        assertEquals( "check no warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "check successes", 3, reporter.getNumSuccesses() );
 
         for ( Iterator i = artifacts.iterator(); i.hasNext(); )
         {
@@ -906,16 +906,16 @@ public class RepositoryConverterTest
 
     private void checkSuccess()
     {
-        assertEquals( "check no errors", 0, reporter.getFailures() );
-        assertEquals( "check no warnings", 0, reporter.getWarnings() );
-        assertEquals( "check success", 1, reporter.getSuccesses() );
+        assertEquals( "check no errors", 0, reporter.getNumFailures() );
+        assertEquals( "check no warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "check success", 1, reporter.getNumSuccesses() );
     }
 
     private void checkFailure()
     {
-        assertEquals( "check num errors", 1, reporter.getFailures() );
-        assertEquals( "check no warnings", 0, reporter.getWarnings() );
-        assertEquals( "check no success", 0, reporter.getSuccesses() );
+        assertEquals( "check num errors", 1, reporter.getNumFailures() );
+        assertEquals( "check no warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "check no success", 0, reporter.getNumSuccesses() );
     }
 
     private String getI18nString( String key )
index af5b539d81b329aa38ec01fb02a166b550b36b4d..dab65753c634c4164932237715dc6e3dd1f87e02 100644 (file)
@@ -80,9 +80,9 @@ public interface ArtifactReporter
 
     Iterator getRepositoryMetadataWarningIterator();
 
-    int getFailures();
+    int getNumFailures();
 
-    int getSuccesses();
+    int getNumSuccesses();
 
-    int getWarnings();
+    int getNumWarnings();
 }
index 919940c8087eb07ef8209609447138132a7a8a41..bb3869ad295b3a74de963d773e677ab0ca949720 100644 (file)
@@ -290,8 +290,8 @@ public class BadMetadataReportProcessor
      */
     private Artifact createArtifact( RepositoryMetadata metadata )
     {
-        return artifactFactory.createBuildArtifact( metadata.getGroupId(), metadata.getArtifactId(),
-                                                    metadata.getBaseVersion(), "pom" );
+        return artifactFactory.createProjectArtifact( metadata.getGroupId(), metadata.getArtifactId(),
+                                                      metadata.getBaseVersion() );
     }
 
     /**
@@ -299,7 +299,7 @@ public class BadMetadataReportProcessor
      */
     private Artifact createArtifact( RepositoryMetadata metadata, String version )
     {
-        return artifactFactory.createBuildArtifact( metadata.getGroupId(), metadata.getArtifactId(), version, "pom" );
+        return artifactFactory.createProjectArtifact( metadata.getGroupId(), metadata.getArtifactId(), version );
     }
 
     /**
index 9d944a86fc496479c38e83534961578c90147ca9..d70e7714450cf183206eae6e468037fd168445cd 100644 (file)
@@ -101,17 +101,17 @@ public class DefaultArtifactReporter
         return metadataWarnings.iterator();
     }
 
-    public int getFailures()
+    public int getNumFailures()
     {
         return artifactFailures.size() + metadataFailures.size();
     }
 
-    public int getSuccesses()
+    public int getNumSuccesses()
     {
         return artifactSuccesses.size() + metadataSuccesses.size();
     }
 
-    public int getWarnings()
+    public int getNumWarnings()
     {
         return artifactWarnings.size() + metadataWarnings.size();
     }
index 17b4723fd0b5d4a21b31440718f1655a8a53e13a..f1e24536895d1da4f1d99a22fe5f02cc7ce0efd5 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.maven.model.Model;
 import java.util.Iterator;
 
 /**
- * 
+ *
  */
 public class ArtifactReportProcessorTest
     extends AbstractRepositoryReportsTestCase
@@ -32,7 +32,7 @@ public class ArtifactReportProcessorTest
 
     private static final String VALID = "temp";
 
-    private MockArtifactReporter reporter;
+    private ArtifactReporter reporter;
 
     private Artifact artifact;
 
@@ -48,7 +48,7 @@ public class ArtifactReportProcessorTest
         throws Exception
     {
         super.setUp();
-        reporter = new MockArtifactReporter();
+        reporter = new DefaultArtifactReporter();
         artifact = new MockArtifact();
         model = new Model();
         processor = new DefaultArtifactReportProcessor();
@@ -57,9 +57,9 @@ public class ArtifactReportProcessorTest
     public void testNullArtifact()
     {
         processor.processArtifact( model, null, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
         assertEquals( ArtifactReporter.NULL_ARTIFACT, result.getReason() );
@@ -72,9 +72,9 @@ public class ArtifactReportProcessorTest
         processor.setRepositoryQueryLayer( queryLayer );
         setRequiredElements( artifact, VALID, VALID, VALID );
         processor.processArtifact( null, artifact, reporter, null );
-        assertEquals( 1, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
         assertEquals( ArtifactReporter.NULL_MODEL, result.getReason() );
@@ -87,9 +87,9 @@ public class ArtifactReportProcessorTest
         processor.setRepositoryQueryLayer( queryLayer );
         setRequiredElements( artifact, VALID, VALID, VALID );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 1, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testArtifactNotFound()
@@ -99,9 +99,9 @@ public class ArtifactReportProcessorTest
         processor.setRepositoryQueryLayer( queryLayer );
         setRequiredElements( artifact, VALID, VALID, VALID );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
         assertEquals( ArtifactReporter.ARTIFACT_NOT_FOUND, result.getReason() );
@@ -123,9 +123,9 @@ public class ArtifactReportProcessorTest
 
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 2, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 2, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testValidArtifactWithValidSingleDependency()
@@ -144,9 +144,9 @@ public class ArtifactReportProcessorTest
 
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 2, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 2, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testValidArtifactWithValidMultipleDependencies()
@@ -173,9 +173,9 @@ public class ArtifactReportProcessorTest
         setRequiredElements( artifact, VALID, VALID, VALID );
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 6, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 6, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testValidArtifactWithAnInvalidDependency()
@@ -202,9 +202,9 @@ public class ArtifactReportProcessorTest
         setRequiredElements( artifact, VALID, VALID, VALID );
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 5, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 5, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -219,9 +219,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, EMPTY_STRING, VALID, VALID );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -236,9 +236,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, VALID, EMPTY_STRING, VALID );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -253,9 +253,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, VALID, VALID, EMPTY_STRING );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -270,9 +270,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, null, VALID, VALID );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -287,9 +287,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, VALID, null, VALID );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -304,9 +304,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, VALID, VALID, null );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -321,9 +321,9 @@ public class ArtifactReportProcessorTest
 
         setRequiredElements( artifact, null, null, null );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 3, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 3, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -350,9 +350,9 @@ public class ArtifactReportProcessorTest
 
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 1, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -375,9 +375,9 @@ public class ArtifactReportProcessorTest
 
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 1, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -400,9 +400,9 @@ public class ArtifactReportProcessorTest
 
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 1, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
@@ -425,9 +425,9 @@ public class ArtifactReportProcessorTest
 
         processor.setRepositoryQueryLayer( queryLayer );
         processor.processArtifact( model, artifact, reporter, null );
-        assertEquals( 1, reporter.getSuccesses() );
-        assertEquals( 3, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumSuccesses() );
+        assertEquals( 3, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
 
         Iterator failures = reporter.getArtifactFailureIterator();
         ArtifactResult result = (ArtifactResult) failures.next();
index e6a7e9ad5906ae1450debfbc52c09e4cb729dded..80a09f72d8578782bd21a37bb951b8d09ba73093 100644 (file)
@@ -24,7 +24,7 @@ import org.apache.maven.model.Model;
 import java.util.Iterator;
 
 /**
- * 
+ *
  */
 public class ArtifactReporterTest
     extends AbstractRepositoryReportsTestCase
@@ -57,7 +57,7 @@ public class ArtifactReporterTest
         processor.processArtifact( model, artifact, reporter, null );
         Iterator success = reporter.getArtifactSuccessIterator();
         assertTrue( success.hasNext() );
-        assertEquals( 1, reporter.getSuccesses() );
+        assertEquals( 1, reporter.getNumSuccesses() );
         Artifact result = ( (ArtifactResult) success.next() ).getArtifact();
         assertEquals( "groupId", result.getGroupId() );
         assertEquals( "artifactId", result.getArtifactId() );
@@ -81,9 +81,9 @@ public class ArtifactReporterTest
             success.next();
         }
         assertEquals( 3, i );
-        assertEquals( 3, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 3, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testArtifactReporterSingleFailure()
@@ -94,9 +94,9 @@ public class ArtifactReporterTest
         assertTrue( failure.hasNext() );
         failure.next();
         assertFalse( failure.hasNext() );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 1, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 1, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testArtifactReporterMultipleFailure()
@@ -113,9 +113,9 @@ public class ArtifactReporterTest
             failure.next();
         }
         assertEquals( 3, i );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 3, reporter.getFailures() );
-        assertEquals( 0, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 3, reporter.getNumFailures() );
+        assertEquals( 0, reporter.getNumWarnings() );
     }
 
     public void testFailureMessages()
@@ -138,9 +138,9 @@ public class ArtifactReporterTest
         assertTrue( warning.hasNext() );
         warning.next();
         assertFalse( warning.hasNext() );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 1, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 1, reporter.getNumWarnings() );
     }
 
     public void testArtifactReporterMultipleWarning()
@@ -157,9 +157,9 @@ public class ArtifactReporterTest
             warning.next();
         }
         assertEquals( 3, i );
-        assertEquals( 0, reporter.getSuccesses() );
-        assertEquals( 0, reporter.getFailures() );
-        assertEquals( 3, reporter.getWarnings() );
+        assertEquals( 0, reporter.getNumSuccesses() );
+        assertEquals( 0, reporter.getNumFailures() );
+        assertEquals( 3, reporter.getNumWarnings() );
     }
 
     public void testWarningMessages()
index 808773b8224fcdee79b27c76680a3884aff6ac9b..73f58393da53d35516cd35a7cc9457728bebb5b9 100644 (file)
@@ -35,6 +35,8 @@ public class BadMetadataReportProcessorTest
 
     private MetadataReportProcessor badMetadataReportProcessor;
 
+    private ArtifactReporter reporter = new DefaultArtifactReporter();
+
     protected void setUp()
         throws Exception
     {
@@ -48,8 +50,6 @@ public class BadMetadataReportProcessorTest
     public void testMetadataMissingLastUpdated()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" );
 
         Versioning versioning = new Versioning();
@@ -71,8 +71,6 @@ public class BadMetadataReportProcessorTest
     public void testMetadataValidVersions()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" );
 
         Versioning versioning = new Versioning();
@@ -91,8 +89,6 @@ public class BadMetadataReportProcessorTest
     public void testMetadataMissingADirectory()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" );
 
         Versioning versioning = new Versioning();
@@ -117,8 +113,6 @@ public class BadMetadataReportProcessorTest
     public void testMetadataInvalidArtifactVersion()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" );
 
         Versioning versioning = new Versioning();
@@ -145,8 +139,6 @@ public class BadMetadataReportProcessorTest
     public void testMoreThanOneMetadataVersionErrors()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" );
 
         Versioning versioning = new Versioning();
@@ -178,8 +170,6 @@ public class BadMetadataReportProcessorTest
     public void testValidPluginMetadata()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "snapshot-artifact", "default2" ) );
@@ -193,8 +183,6 @@ public class BadMetadataReportProcessorTest
     public void testMissingMetadataPlugin()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "snapshot-artifact", "default2" ) );
@@ -214,8 +202,6 @@ public class BadMetadataReportProcessorTest
     public void testIncompletePluginMetadata()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
 
@@ -234,8 +220,6 @@ public class BadMetadataReportProcessorTest
     public void testInvalidPluginArtifactId()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "snapshot-artifact", "default2" ) );
@@ -259,8 +243,6 @@ public class BadMetadataReportProcessorTest
     public void testInvalidPluginPrefix()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", null ) );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "snapshot-artifact", "" ) );
@@ -283,8 +265,6 @@ public class BadMetadataReportProcessorTest
     public void testDuplicatePluginPrefixes()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
         metadata.getMetadata().addPlugin( createMetadataPlugin( "snapshot-artifact", "default" ) );
@@ -302,8 +282,6 @@ public class BadMetadataReportProcessorTest
     public void testValidSnapshotMetadata()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact =
             artifactFactory.createBuildArtifact( "groupId", "snapshot-artifact", "1.0-alpha-1-SNAPSHOT", "type" );
 
@@ -322,8 +300,6 @@ public class BadMetadataReportProcessorTest
     public void testInvalidSnapshotMetadata()
         throws ReportProcessorException
     {
-        ArtifactReporter reporter = new MockArtifactReporter();
-
         Artifact artifact =
             artifactFactory.createBuildArtifact( "groupId", "snapshot-artifact", "1.0-alpha-1-SNAPSHOT", "type" );
 
index 7b28f601405d5e74ed1e31d8a2c08c921f476bfc..6132204db69aa601ea4cca3be8eb992811092eb7 100644 (file)
@@ -40,7 +40,7 @@ public class ChecksumArtifactReporterTest
 {
     private ArtifactReportProcessor artifactReportProcessor;
 
-    private ArtifactReporter reporter = new MockArtifactReporter();
+    private ArtifactReporter reporter = new DefaultArtifactReporter();
 
     private MetadataReportProcessor metadataReportProcessor;
 
@@ -67,7 +67,7 @@ public class ChecksumArtifactReporterTest
             new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", handler );
 
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        assertEquals( 2, reporter.getSuccesses() );
+        assertEquals( 2, reporter.getNumSuccesses() );
     }
 
     /**
@@ -82,7 +82,7 @@ public class ChecksumArtifactReporterTest
             new DefaultArtifact( "checksumTest", "invalidArtifact", version, "compile", "jar", "", handler );
 
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        assertEquals( 2, reporter.getFailures() );
+        assertEquals( 2, reporter.getNumFailures() );
     }
 
     /**
@@ -151,7 +151,7 @@ public class ChecksumArtifactReporterTest
             new DefaultArtifact( "checksumTest", "validArtifact", version, "compile", "jar", "", handler );
 
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        assertEquals( 2, reporter.getFailures() );
+        assertEquals( 2, reporter.getNumFailures() );
 
         RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( artifact );
         metadataReportProcessor.processMetadata( metadata, repository, reporter );
index fb4bb274f41a1657636876a3af55c61bd36c398c..7cd3b94bf481def0088f6ac13499c112cd52a6a9 100644 (file)
@@ -38,9 +38,9 @@ public class DefaultArtifactReporterTest
 
     public void testEmptyArtifactReporter()
     {
-        assertEquals( "No failures", 0, reporter.getFailures() );
-        assertEquals( "No warnings", 0, reporter.getWarnings() );
-        assertEquals( "No successes", 0, reporter.getSuccesses() );
+        assertEquals( "No failures", 0, reporter.getNumFailures() );
+        assertEquals( "No warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "No successes", 0, reporter.getNumSuccesses() );
         assertFalse( "No artifact failures", reporter.getArtifactFailureIterator().hasNext() );
         assertFalse( "No artifact warnings", reporter.getArtifactWarningIterator().hasNext() );
         assertFalse( "No artifact successes", reporter.getArtifactSuccessIterator().hasNext() );
@@ -52,9 +52,9 @@ public class DefaultArtifactReporterTest
     public void testMetadataSingleFailure()
     {
         reporter.addFailure( metadata, "Single Failure Reason" );
-        assertEquals( "failures count", 1, reporter.getFailures() );
-        assertEquals( "warnings count", 0, reporter.getWarnings() );
-        assertEquals( "successes count", 0, reporter.getSuccesses() );
+        assertEquals( "failures count", 1, reporter.getNumFailures() );
+        assertEquals( "warnings count", 0, reporter.getNumWarnings() );
+        assertEquals( "successes count", 0, reporter.getNumSuccesses() );
 
         Iterator results = reporter.getRepositoryMetadataFailureIterator();
         assertTrue( "must have failures", results.hasNext() );
@@ -68,9 +68,9 @@ public class DefaultArtifactReporterTest
     {
         reporter.addFailure( metadata, "First Failure Reason" );
         reporter.addFailure( metadata, "Second Failure Reason" );
-        assertEquals( "failures count", 2, reporter.getFailures() );
-        assertEquals( "warnings count", 0, reporter.getWarnings() );
-        assertEquals( "successes count", 0, reporter.getSuccesses() );
+        assertEquals( "failures count", 2, reporter.getNumFailures() );
+        assertEquals( "warnings count", 0, reporter.getNumWarnings() );
+        assertEquals( "successes count", 0, reporter.getNumSuccesses() );
 
         Iterator results = reporter.getRepositoryMetadataFailureIterator();
         assertTrue( "must have failures", results.hasNext() );
@@ -87,9 +87,9 @@ public class DefaultArtifactReporterTest
     public void testMetadataSingleWarning()
     {
         reporter.addWarning( metadata, "Single Warning Message" );
-        assertEquals( "failures count", 0, reporter.getFailures() );
-        assertEquals( "warnings count", 1, reporter.getWarnings() );
-        assertEquals( "successes count", 0, reporter.getSuccesses() );
+        assertEquals( "failures count", 0, reporter.getNumFailures() );
+        assertEquals( "warnings count", 1, reporter.getNumWarnings() );
+        assertEquals( "successes count", 0, reporter.getNumSuccesses() );
 
         Iterator results = reporter.getRepositoryMetadataWarningIterator();
         assertTrue( "must have failures", results.hasNext() );
@@ -103,9 +103,9 @@ public class DefaultArtifactReporterTest
     {
         reporter.addWarning( metadata, "First Warning" );
         reporter.addWarning( metadata, "Second Warning" );
-        assertEquals( "failures count", 0, reporter.getFailures() );
-        assertEquals( "warnings count", 2, reporter.getWarnings() );
-        assertEquals( "successes count", 0, reporter.getSuccesses() );
+        assertEquals( "failures count", 0, reporter.getNumFailures() );
+        assertEquals( "warnings count", 2, reporter.getNumWarnings() );
+        assertEquals( "successes count", 0, reporter.getNumSuccesses() );
 
         Iterator results = reporter.getRepositoryMetadataWarningIterator();
         assertTrue( "must have warnings", results.hasNext() );
@@ -122,9 +122,9 @@ public class DefaultArtifactReporterTest
     public void testMetadataSingleSuccess()
     {
         reporter.addSuccess( metadata );
-        assertEquals( "failures count", 0, reporter.getFailures() );
-        assertEquals( "warnings count", 0, reporter.getWarnings() );
-        assertEquals( "successes count", 1, reporter.getSuccesses() );
+        assertEquals( "failures count", 0, reporter.getNumFailures() );
+        assertEquals( "warnings count", 0, reporter.getNumWarnings() );
+        assertEquals( "successes count", 1, reporter.getNumSuccesses() );
 
         Iterator results = reporter.getRepositoryMetadataSuccessIterator();
         assertTrue( "must have successes", results.hasNext() );
@@ -143,9 +143,9 @@ public class DefaultArtifactReporterTest
 
         reporter.addSuccess( metadata );
         reporter.addSuccess( metadata2 );
-        assertEquals( "failures count", 0, reporter.getFailures() );
-        assertEquals( "warnings count", 0, reporter.getWarnings() );
-        assertEquals( "successes count", 2, reporter.getSuccesses() );
+        assertEquals( "failures count", 0, reporter.getNumFailures() );
+        assertEquals( "warnings count", 0, reporter.getNumWarnings() );
+        assertEquals( "successes count", 2, reporter.getNumSuccesses() );
 
         Iterator results = reporter.getRepositoryMetadataSuccessIterator();
         assertTrue( "must have successes", results.hasNext() );
index c1223137be0cedd736015a550dd15ff76e211216..8e55976d9f03c4381aa437634084935dee187041 100644 (file)
@@ -43,6 +43,8 @@ public class DuplicateArtifactFileReportProcessorTest
 
     File indexDirectory;
 
+    private DefaultArtifactReporter reporter = new DefaultArtifactReporter();
+
     protected void setUp()
         throws Exception
     {
@@ -73,38 +75,32 @@ public class DuplicateArtifactFileReportProcessorTest
     {
         artifact.setFile( null );
 
-        MockArtifactReporter reporter = new MockArtifactReporter();
-
         processor.processArtifact( model, artifact, reporter, repository );
 
-        assertEquals( "Check no successes", 0, reporter.getSuccesses() );
-        assertEquals( "Check warnings", 1, reporter.getWarnings() );
-        assertEquals( "Check no failures", 0, reporter.getFailures() );
+        assertEquals( "Check no successes", 0, reporter.getNumSuccesses() );
+        assertEquals( "Check warnings", 1, reporter.getNumWarnings() );
+        assertEquals( "Check no failures", 0, reporter.getNumFailures() );
     }
 
     public void testSuccessOnAlreadyIndexedArtifact()
         throws Exception
     {
-        MockArtifactReporter reporter = new MockArtifactReporter();
-
         processor.processArtifact( model, artifact, reporter, repository );
 
-        assertEquals( "Check no successes", 1, reporter.getSuccesses() );
-        assertEquals( "Check warnings", 0, reporter.getWarnings() );
-        assertEquals( "Check no failures", 0, reporter.getFailures() );
+        assertEquals( "Check no successes", 1, reporter.getNumSuccesses() );
+        assertEquals( "Check warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "Check no failures", 0, reporter.getNumFailures() );
     }
 
     public void testSuccessOnDifferentGroupId()
         throws Exception
     {
-        MockArtifactReporter reporter = new MockArtifactReporter();
-
         artifact.setGroupId( "different.groupId" );
         processor.processArtifact( model, artifact, reporter, repository );
 
-        assertEquals( "Check no successes", 1, reporter.getSuccesses() );
-        assertEquals( "Check warnings", 0, reporter.getWarnings() );
-        assertEquals( "Check no failures", 0, reporter.getFailures() );
+        assertEquals( "Check no successes", 1, reporter.getNumSuccesses() );
+        assertEquals( "Check warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "Check no failures", 0, reporter.getNumFailures() );
     }
 
     public void testSuccessOnNewArtifact()
@@ -112,13 +108,11 @@ public class DuplicateArtifactFileReportProcessorTest
     {
         Artifact newArtifact = createArtifact( "groupId", "artifactId", "1.0-alpha-1", "1.0-alpha-1", "pom" );
 
-        MockArtifactReporter reporter = new MockArtifactReporter();
-
         processor.processArtifact( model, newArtifact, reporter, repository );
 
-        assertEquals( "Check no successes", 1, reporter.getSuccesses() );
-        assertEquals( "Check warnings", 0, reporter.getWarnings() );
-        assertEquals( "Check no failures", 0, reporter.getFailures() );
+        assertEquals( "Check no successes", 1, reporter.getNumSuccesses() );
+        assertEquals( "Check warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "Check no failures", 0, reporter.getNumFailures() );
     }
 
     public void testFailure()
@@ -128,13 +122,11 @@ public class DuplicateArtifactFileReportProcessorTest
                                              artifact.getVersion(), artifact.getType() );
         duplicate.setFile( artifact.getFile() );
 
-        MockArtifactReporter reporter = new MockArtifactReporter();
-
         processor.processArtifact( model, duplicate, reporter, repository );
 
-        assertEquals( "Check no successes", 0, reporter.getSuccesses() );
-        assertEquals( "Check warnings", 0, reporter.getWarnings() );
-        assertEquals( "Check no failures", 1, reporter.getFailures() );
+        assertEquals( "Check no successes", 0, reporter.getNumSuccesses() );
+        assertEquals( "Check warnings", 0, reporter.getNumWarnings() );
+        assertEquals( "Check no failures", 1, reporter.getNumFailures() );
     }
 
     private Artifact createArtifact( String groupId, String artifactId, String baseVersion, String version,
index 40fc565b3bbb91765b2134ec8a6c668239f10fe8..511601d96db46bb49788e4d9933a4e2e7d19828f 100644 (file)
@@ -30,7 +30,7 @@ public class InvalidPomArtifactReportProcessorTest
 {
     private ArtifactReportProcessor artifactReportProcessor;
 
-    private ArtifactReporter reporter = new MockArtifactReporter();
+    private ArtifactReporter reporter = new DefaultArtifactReporter();
 
     public void setUp()
         throws Exception
@@ -51,7 +51,7 @@ public class InvalidPomArtifactReportProcessorTest
             new DefaultArtifact( "org.apache.maven", "artifactId", version, "compile", "pom", "", handler );
 
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        assertEquals( 1, reporter.getFailures() );
+        assertEquals( 1, reporter.getNumFailures() );
     }
 
 
@@ -66,7 +66,7 @@ public class InvalidPomArtifactReportProcessorTest
         Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "pom", "", handler );
 
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        assertEquals( 1, reporter.getSuccesses() );
+        assertEquals( 1, reporter.getNumSuccesses() );
     }
 
 
@@ -81,6 +81,6 @@ public class InvalidPomArtifactReportProcessorTest
         Artifact artifact = new DefaultArtifact( "groupId", "artifactId", version, "compile", "jar", "", handler );
 
         artifactReportProcessor.processArtifact( null, artifact, reporter, repository );
-        assertEquals( 1, reporter.getWarnings() );
+        assertEquals( 1, reporter.getNumWarnings() );
     }
 }
index f1acef97edcf4361e2f210a756b562bb9835f701..38d1ef064858aeb2bf6f75bbb54a2e146f64ebe3 100644 (file)
@@ -38,7 +38,7 @@ public class LocationArtifactReportProcessorTest
 {
     private ArtifactReportProcessor artifactReportProcessor;
 
-    private ArtifactReporter reporter = new MockArtifactReporter();
+    private ArtifactReporter reporter = new DefaultArtifactReporter();
 
     private MavenXpp3Reader pomReader;
 
@@ -74,7 +74,7 @@ public class LocationArtifactReportProcessorTest
         Model model = readPom( path );
 
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-        assertEquals( 1, reporter.getSuccesses() );
+        assertEquals( 1, reporter.getNumSuccesses() );
     }
 
     /**
@@ -92,7 +92,7 @@ public class LocationArtifactReportProcessorTest
         Model model = readPom( path );
 
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-        assertEquals( 1, reporter.getSuccesses() );
+        assertEquals( 1, reporter.getNumSuccesses() );
     }
 
     /**
@@ -110,7 +110,7 @@ public class LocationArtifactReportProcessorTest
         Model model = readPom( path );
 
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-        assertEquals( 1, reporter.getFailures() );
+        assertEquals( 1, reporter.getNumFailures() );
     }
 
     /**
@@ -129,7 +129,7 @@ public class LocationArtifactReportProcessorTest
         Model model = readPom( path );
 
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-        assertEquals( 1, reporter.getFailures() );
+        assertEquals( 1, reporter.getNumFailures() );
     }
 
     private Model readPom( String path )
@@ -165,7 +165,7 @@ public class LocationArtifactReportProcessorTest
         Model model = readPom( path );
 
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-        assertEquals( 1, reporter.getFailures() );
+        assertEquals( 1, reporter.getNumFailures() );
     }
 
     /**
@@ -184,6 +184,6 @@ public class LocationArtifactReportProcessorTest
         Model model = readPom( path );
 
         artifactReportProcessor.processArtifact( model, artifact, reporter, repository );
-        assertEquals( 1, reporter.getFailures() );
+        assertEquals( 1, reporter.getNumFailures() );
     }
 }
diff --git a/archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/MockArtifactReporter.java b/archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/MockArtifactReporter.java
deleted file mode 100755 (executable)
index 0666b95..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.apache.maven.archiva.reporting;
-
-/*
- * Copyright 2005-2006 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.artifact.repository.metadata.RepositoryMetadata;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Mock implementation of the artifact reporter.
- *
- * @author <a href="mailto:brett@apache.org">Brett Porter</a>
- * @version $Id$
- */
-public class MockArtifactReporter
-    implements ArtifactReporter
-{
-    private List artifactFailures = new ArrayList();
-
-    private List artifactSuccesses = new ArrayList();
-
-    private List artifactWarnings = new ArrayList();
-
-    private List metadataFailures = new ArrayList();
-
-    private List metadataSuccesses = new ArrayList();
-
-    private List metadataWarnings = new ArrayList();
-
-    public void addFailure( Artifact artifact, String reason )
-    {
-        artifactFailures.add( new ArtifactResult( artifact, reason ) );
-    }
-
-    public void addSuccess( Artifact artifact )
-    {
-        artifactSuccesses.add( new ArtifactResult( artifact ) );
-    }
-
-    public void addWarning( Artifact artifact, String message )
-    {
-        artifactWarnings.add( new ArtifactResult( artifact, message ) );
-    }
-
-    public void addFailure( RepositoryMetadata metadata, String reason )
-    {
-        metadataFailures.add( new RepositoryMetadataResult( metadata, reason ) );
-    }
-
-    public void addSuccess( RepositoryMetadata metadata )
-    {
-        metadataSuccesses.add( new RepositoryMetadataResult( metadata ) );
-    }
-
-    public void addWarning( RepositoryMetadata metadata, String message )
-    {
-        metadataWarnings.add( new RepositoryMetadataResult( metadata, message ) );
-    }
-
-    public Iterator getArtifactFailureIterator()
-    {
-        return artifactFailures.iterator();
-    }
-
-    public Iterator getArtifactSuccessIterator()
-    {
-        return artifactSuccesses.iterator();
-    }
-
-    public Iterator getArtifactWarningIterator()
-    {
-        return artifactWarnings.iterator();
-    }
-
-    public Iterator getRepositoryMetadataFailureIterator()
-    {
-        return metadataFailures.iterator();
-    }
-
-    public Iterator getRepositoryMetadataSuccessIterator()
-    {
-        return metadataSuccesses.iterator();
-    }
-
-    public Iterator getRepositoryMetadataWarningIterator()
-    {
-        return metadataWarnings.iterator();
-    }
-
-    public int getFailures()
-    {
-        return artifactFailures.size();
-    }
-
-    public int getSuccesses()
-    {
-        return artifactSuccesses.size();
-    }
-
-    public int getWarnings()
-    {
-        return artifactWarnings.size();
-    }
-}