maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r353954 - in /maven/repository-manager/trunk/maven-repository-reports-standard: ./ src/main/java/org/apache/maven/repository/ src/main/java/org/apache/maven/repository/reporting/ src/main/java/org/apache/maven/repository/reporting/reports/ ...
Date Mon, 05 Dec 2005 01:42:03 GMT
Author: brett
Date: Sun Dec  4 17:41:43 2005
New Revision: 353954

URL: http://svn.apache.org/viewcvs?rev=353954&view=rev
Log:
some updates to the reports base and tests
- simplify the result classes
- we need a factory component for the query layer, because the query layer needs a repository
- added a mock implementation of the reporter (removed the "default" one which is the same)
- added a default repository query interface that uses the file system
- add a test for the metadata versions not matching the repo
- add some comments

Added:
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java   (with props)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java   (with props)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java   (with props)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java   (with props)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java   (with props)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java   (with props)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-1/
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-1/artifactId-1.0-alpha-1.pom
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-2/
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-2/artifactId-1.0-alpha-2.pom
Removed:
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/RepositoryFileFilter.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultArtifactReporter.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/reports/
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DefaultArtifactReporterTest.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerTest.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/TestBadMetadataReportProcessor.java
Modified:
    maven/repository-manager/trunk/maven-repository-reports-standard/   (props changed)
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/BadMetadataReportProcessor.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/main/resources/META-INF/plexus/components.xml
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/AbstractRepositoryReportsTestCase.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/BadMetadataReportProcessorTest.java
    maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Dec  4 17:41:43 2005
@@ -1 +1,2 @@
 target
+*.iml

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactReporter.java Sun Dec  4 17:41:43 2005
@@ -19,12 +19,14 @@
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
 
+import java.util.Iterator;
+
 /**
  * This interface is used by the single artifact processor.
- *
- * The initial implementation of this will just need to be a mock implementation in src/test/java, used to track the 
- *      failures and successes for checking assertions. Later, implementations will be made to present reports on the 
- *      web interface, send them via mail, and so on.
+ * <p/>
+ * The initial implementation of this will just need to be a mock implementation in src/test/java, used to track the
+ * failures and successes for checking assertions. Later, implementations will be made to present reports on the
+ * web interface, send them via mail, and so on.
  */
 public interface ArtifactReporter
 {
@@ -35,10 +37,23 @@
     void addSuccess( Artifact artifact );
 
     void addWarning( Artifact artifact, String message );
-    
+
     void addFailure( RepositoryMetadata metadata, String reason );
 
     void addSuccess( RepositoryMetadata metadata );
 
     void addWarning( RepositoryMetadata metadata, String message );
+
+    Iterator getArtifactFailureIterator();
+
+    Iterator getArtifactSuccessIterator();
+
+    Iterator getArtifactWarningIterator();
+
+    Iterator getRepositoryMetadataFailureIterator();
+
+    Iterator getRepositoryMetadataSuccessIterator();
+
+    Iterator getRepositoryMetadataWarningIterator();
+
 }

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java?rev=353954&view=auto
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java (added)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java Sun Dec  4 17:41:43 2005
@@ -0,0 +1,54 @@
+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;
+
+/**
+ * A result of the report for a given artifact being processed.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class ArtifactResult
+{
+    private final Artifact artifact;
+
+    private final String reason;
+
+    public ArtifactResult( Artifact artifact )
+    {
+        this.artifact = artifact;
+        this.reason = null;
+    }
+
+    public ArtifactResult( Artifact artifact, String reason )
+    {
+        this.artifact = artifact;
+        this.reason = reason;
+    }
+
+    public Artifact getArtifact()
+    {
+        return artifact;
+    }
+
+    public String getReason()
+    {
+        return reason;
+    }
+}

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ArtifactResult.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/BadMetadataReportProcessor.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/BadMetadataReportProcessor.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/BadMetadataReportProcessor.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/BadMetadataReportProcessor.java Sun Dec  4 17:41:43 2005
@@ -8,7 +8,6 @@
  * 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,
@@ -17,9 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.util.HashMap;
-import java.util.Iterator;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -27,31 +23,39 @@
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
 import org.apache.maven.artifact.repository.metadata.Snapshot;
 import org.apache.maven.artifact.repository.metadata.Versioning;
-import org.apache.maven.repository.RepositoryFileFilter;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
 
 
 /**
  * This class will report on bad metadata files.  These include invalid version declarations and incomplete version
  * information inside the metadata file.  Plugin metadata will be checked for validity of the latest plugin artifacts.
- *
  */
-public class BadMetadataReportProcessor implements MetadataReportProcessor
+public class BadMetadataReportProcessor
+    implements MetadataReportProcessor
 {
     // plexus components
     private ArtifactFactory artifactFactory;
-    private RepositoryQueryLayer repositoryQueryLayer;
-    
+
+    private RepositoryQueryLayerFactory repositoryQueryLayerFactory;
+
     public void processMetadata( RepositoryMetadata metadata, ArtifactRepository repository, ArtifactReporter reporter )
+        throws ReportProcessorException
     {
         boolean hasFailures = false;
-        
+
         String lastUpdated = metadata.getMetadata().getVersioning().getLastUpdated();
         if ( lastUpdated == null || lastUpdated.length() == 0 )
         {
             reporter.addFailure( metadata, "Missing lastUpdated element inside the metadata." );
             hasFailures = true;
         }
-        
+
         if ( metadata.storedInGroupDirectory() )
         {
             checkPluginMetadata( metadata, repository, reporter );
@@ -62,36 +66,53 @@
         }
         else
         {
-            if ( !checkMetadataVersions( metadata, repository, reporter ) ) hasFailures = true;
-            
-            if ( checkRepositoryVersions( metadata, repository, reporter ) ) hasFailures = true;
+            if ( !checkMetadataVersions( metadata, repository, reporter ) )
+            {
+                hasFailures = true;
+            }
+
+            try
+            {
+                if ( checkRepositoryVersions( metadata, repository, reporter ) )
+                {
+                    hasFailures = true;
+                }
+            }
+            catch ( IOException e )
+            {
+                throw new ReportProcessorException( "Error getting versions", e );
+            }
+        }
+
+        if ( !hasFailures )
+        {
+            reporter.addSuccess( metadata );
         }
-        
-        if ( !hasFailures ) reporter.addSuccess( metadata );
     }
-    
+
     /**
      * Checks the plugin metadata
      */
     public boolean checkPluginMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
-            ArtifactReporter reporter )
+                                        ArtifactReporter reporter )
     {
         boolean hasFailures = false;
-        
-        File metadataDir = new File ( repository.getBasedir() + File.pathSeparator + formatAsDirectory( metadata.getGroupId() ) );
-        
+
+        File metadataDir =
+            new File( repository.getBasedir(), repository.pathOfRemoteRepositoryMetadata( metadata ) ).getParentFile();
+
         HashMap prefixes = new HashMap();
-        for( Iterator plugins = metadata.getMetadata().getPlugins().iterator(); plugins.hasNext(); )
+        for ( Iterator plugins = metadata.getMetadata().getPlugins().iterator(); plugins.hasNext(); )
         {
             Plugin plugin = (Plugin) plugins.next();
-            
+
             String artifactId = plugin.getArtifactId();
             if ( artifactId == null || artifactId.length() == 0 )
             {
                 reporter.addFailure( metadata, "Missing or empty artifactId in group metadata." );
                 hasFailures = true;
             }
-            
+
             String prefix = plugin.getPrefix();
             if ( prefix == null || prefix.length() == 0 )
             {
@@ -110,7 +131,7 @@
                     prefixes.put( prefix, plugin );
                 }
             }
-            
+
             File pluginDir = new File( metadataDir, artifactId );
             if ( !pluginDir.exists() )
             {
@@ -118,23 +139,23 @@
                 hasFailures = true;
             }
         }
-        
+
         return hasFailures;
     }
-    
+
     /**
      * Checks the snapshot metadata
      */
-    public boolean checkSnapshotMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
-            ArtifactReporter reporter )
+    private boolean checkSnapshotMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
+                                           ArtifactReporter reporter )
     {
         boolean hasFailures = false;
-        
+
         Snapshot snapshot = metadata.getMetadata().getVersioning().getSnapshot();
         String timestamp = snapshot.getTimestamp();
         String buildNumber = String.valueOf( snapshot.getBuildNumber() );
         String artifactName = metadata.getArtifactId() + "-" + timestamp + "-" + buildNumber + ".pom";
-        
+
         //@todo use wagon instead
         Artifact artifact = createArtifact( metadata );
         File artifactFile = new File( repository.pathOf( artifact ) );
@@ -144,83 +165,85 @@
             reporter.addFailure( metadata, "Snapshot artifact " + artifactName + " does not exist." );
             hasFailures = true;
         }
-        
+
         return hasFailures;
     }
-    
+
     /**
      * Checks the declared metadata versions if the artifacts are present in the repository
      */
-    public boolean checkMetadataVersions( RepositoryMetadata metadata, ArtifactRepository repository,
-            ArtifactReporter reporter )
+    private boolean checkMetadataVersions( RepositoryMetadata metadata, ArtifactRepository repository,
+                                           ArtifactReporter reporter )
     {
+        RepositoryQueryLayer repositoryQueryLayer =
+            repositoryQueryLayerFactory.createRepositoryQueryLayer( repository );
+
         boolean hasFailures = false;
         Versioning versioning = metadata.getMetadata().getVersioning();
         for ( Iterator versions = versioning.getVersions().iterator(); versions.hasNext(); )
         {
             String version = (String) versions.next();
-            
+
             Artifact artifact = createArtifact( metadata, version );
-            
+
             if ( !repositoryQueryLayer.containsArtifact( artifact ) )
             {
                 reporter.addFailure( metadata, "Artifact version " + version + " is present in metadata but " +
-                        "missing in the repository." );
-                if ( !hasFailures ) hasFailures = true;
+                    "missing in the repository." );
+                if ( !hasFailures )
+                {
+                    hasFailures = true;
+                }
             }
         }
         return hasFailures;
     }
-    
+
     /**
      * Searches the artifact repository directory for all versions and verifies that all of them are listed in the
      * metadata file.
      */
-    public boolean checkRepositoryVersions( RepositoryMetadata metadata, ArtifactRepository repository,
-            ArtifactReporter reporter )
+    private boolean checkRepositoryVersions( RepositoryMetadata metadata, ArtifactRepository repository,
+                                             ArtifactReporter reporter )
+        throws IOException
     {
         boolean hasFailures = false;
         Versioning versioning = metadata.getMetadata().getVersioning();
-        String repositoryPath = repository.getBasedir();
-        File versionsDir = new File( repositoryPath, formatAsDirectory( metadata.getGroupId() ) +
-                File.pathSeparator + metadata.getArtifactId() );
-        File[] versions = versionsDir.listFiles( new RepositoryFileFilter() );
-        for( int idx=0; idx<versions.length; idx++ )
+        // TODO: change this to look for repository artifacts. It needs to centre around that I think, currently this is hardwired to the default layout
+        File versionsDir =
+            new File( repository.getBasedir(), repository.pathOfRemoteRepositoryMetadata( metadata ) ).getParentFile();
+        List versions = FileUtils.getFileNames( versionsDir, "*/*.pom", null, false );
+        for ( Iterator i = versions.iterator(); i.hasNext(); )
         {
-            String version = versions[ idx ].getName();
+            File path = new File( (String) i.next() );
+            String version = path.getParentFile().getName();
             if ( !versioning.getVersions().contains( version ) )
             {
                 reporter.addFailure( metadata, "Artifact version " + version + " found in the repository but " +
-                        "missing in the metadata." );
-                if ( !hasFailures ) hasFailures = true;
+                    "missing in the metadata." );
+                if ( !hasFailures )
+                {
+                    hasFailures = true;
+                }
             }
         }
         return hasFailures;
     }
-    
-    /**
-     * Formats an artifact groupId to the directory structure format used for storage in repositories
-     */
-    private String formatAsDirectory( String directory )
-    {
-        return directory.replace( '.', File.pathSeparatorChar );
-    }
-    
+
     /**
      * Used to create an artifact object from a metadata base version
      */
     private Artifact createArtifact( RepositoryMetadata metadata )
     {
         return artifactFactory.createBuildArtifact( metadata.getGroupId(), metadata.getArtifactId(),
-                metadata.getBaseVersion(), "pom" );
+                                                    metadata.getBaseVersion(), "pom" );
     }
-    
+
     /**
      * Used to create an artifact object with a specified version
      */
     private Artifact createArtifact( RepositoryMetadata metadata, String version )
     {
-        return artifactFactory.createBuildArtifact( metadata.getGroupId(), metadata.getArtifactId(),
-                version, "pom" );
+        return artifactFactory.createBuildArtifact( metadata.getGroupId(), metadata.getArtifactId(), version, "pom" );
     }
 }

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayer.java Sun Dec  4 17:41:43 2005
@@ -1,7 +1,5 @@
 package org.apache.maven.repository.reporting;
 
-import org.apache.maven.artifact.Artifact;
-
 /*
  * Copyright 2001-2005 The Apache Software Foundation.
  *
@@ -10,7 +8,6 @@
  * 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,
@@ -19,14 +16,27 @@
  * limitations under the License.
  */
 
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+
+import java.io.File;
+
 /**
  * @author <a href="mailto:jtolentino@mergere.com">John Tolentino</a>
  */
 public class DefaultRepositoryQueryLayer
     implements RepositoryQueryLayer
 {
+    private final ArtifactRepository repository;
+
+    public DefaultRepositoryQueryLayer( ArtifactRepository repository )
+    {
+        this.repository = repository;
+    }
+
     public boolean containsArtifact( Artifact artifact )
     {
-        return true;
+        File f = new File( repository.getBasedir(), repository.pathOf( artifact ) );
+        return f.exists();
     }
 }

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java?rev=353954&view=auto
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java (added)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java Sun Dec  4 17:41:43 2005
@@ -0,0 +1,34 @@
+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.ArtifactRepository;
+
+/**
+ * Gets the default implementation of a repository query layer for the given repository.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class DefaultRepositoryQueryLayerFactory
+    implements RepositoryQueryLayerFactory
+{
+    public RepositoryQueryLayer createRepositoryQueryLayer( ArtifactRepository repository )
+    {
+        return new DefaultRepositoryQueryLayer( repository );
+    }
+}

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/DefaultRepositoryQueryLayerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/MetadataReportProcessor.java Sun Dec  4 17:41:43 2005
@@ -27,5 +27,6 @@
 {
     String ROLE = MetadataReportProcessor.class.getName();
 
-    void processMetadata( RepositoryMetadata metadata, ArtifactRepository repository, ArtifactReporter reporter );
+    void processMetadata( RepositoryMetadata metadata, ArtifactRepository repository, ArtifactReporter reporter )
+        throws ReportProcessorException;
 }

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java?rev=353954&view=auto
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java (added)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java Sun Dec  4 17:41:43 2005
@@ -0,0 +1,32 @@
+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.
+ */
+
+/**
+ * Exception occurring during reporting.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class ReportProcessorException
+    extends Exception
+{
+    public ReportProcessorException( String msg, Throwable cause )
+    {
+        super( msg, cause );
+    }
+}

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/ReportProcessorException.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java?rev=353954&view=auto
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java (added)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java Sun Dec  4 17:41:43 2005
@@ -0,0 +1,54 @@
+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;
+
+/**
+ * A result of the report for a given artifact being processed.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public class RepositoryMetadataResult
+{
+    private final RepositoryMetadata metadata;
+
+    private final String reason;
+
+    public RepositoryMetadataResult( RepositoryMetadata metadata )
+    {
+        this.metadata = metadata;
+        this.reason = null;
+    }
+
+    public RepositoryMetadataResult( RepositoryMetadata metadata, String reason )
+    {
+        this.metadata = metadata;
+        this.reason = reason;
+    }
+
+    public RepositoryMetadata getMetadata()
+    {
+        return metadata;
+    }
+
+    public String getReason()
+    {
+        return reason;
+    }
+}

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryMetadataResult.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java?rev=353954&view=auto
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java (added)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java Sun Dec  4 17:41:43 2005
@@ -0,0 +1,38 @@
+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.ArtifactRepository;
+
+/**
+ * Gets the preferred implementation of a repository query layer for the given repository.
+ *
+ * @author <a href="mailto:brett@apache.org">Brett Porter</a>
+ * @version $Id$
+ */
+public interface RepositoryQueryLayerFactory
+{
+    String ROLE = RepositoryQueryLayerFactory.class.getName();
+
+    /**
+     * Create or obtain a query interface.
+     *
+     * @param repository the repository to query
+     * @return the obtained query layer
+     */
+    RepositoryQueryLayer createRepositoryQueryLayer( ArtifactRepository repository );
+}

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/java/org/apache/maven/repository/reporting/RepositoryQueryLayerFactory.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/main/resources/META-INF/plexus/components.xml?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/main/resources/META-INF/plexus/components.xml Sun Dec  4 17:41:43 2005
@@ -1,24 +1,16 @@
 <component-set>
   <components>
     <component>
-      <role>org.apache.maven.repository.reporting.ArtifactReporter</role>
-      <role-hint>default</role-hint>
-      <implementation>org.apache.maven.repository.reporting.DefaultArtifactReporter</implementation>
-      <instantiation-strategy>per-lookup</instantiation-strategy>
+      <role>org.apache.maven.repository.reporting.RepositoryQueryLayerFactory</role>
+      <implementation>org.apache.maven.repository.reporting.DefaultRepositoryQueryLayerFactory</implementation>
     </component>
     <component>
-      <role>org.apache.maven.repository.reporting.RepositoryQueryLayer</role>
-      <role-hint>default</role-hint>
-      <implementation>org.apache.maven.repository.reporting.DefaultRepositoryQueryLayer</implementation>
-      <instantiation-strategy>per-lookup</instantiation-strategy>
-    </component>
-    <component>
-      <role>org.apache.maven.repository.reporting.BadMetadataReporter</role>
-      <role-hint>default</role-hint>
-      <implementation>org.apache.maven.repository.reporting.BadMetadataReporter</implementation>
+      <role>org.apache.maven.repository.reporting.MetadataReportProcessor</role>
+      <role-hint>bad-metadata</role-hint>
+      <implementation>org.apache.maven.repository.reporting.BadMetadataReportProcessor</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.repository.reporting.RepositoryQueryLayer</role>
+          <role>org.apache.maven.repository.reporting.RepositoryQueryLayerFactory</role>
         </requirement>
         <requirement>
           <role>org.apache.maven.artifact.factory.ArtifactFactory</role>

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/AbstractRepositoryReportsTestCase.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/AbstractRepositoryReportsTestCase.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/AbstractRepositoryReportsTestCase.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/AbstractRepositoryReportsTestCase.java Sun Dec  4 17:41:43 2005
@@ -17,9 +17,12 @@
  * limitations under the License.
  */
 
-import java.io.File;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
 
 /**
  * @author <a href="mailto:jtolentino@mergere.com">John Tolentino</a>
@@ -27,54 +30,22 @@
 public abstract class AbstractRepositoryReportsTestCase
     extends PlexusTestCase
 {
-    private static String JAR = ".jar";
-
-    private static String basedir;
-
-    private static String[] directoryStructure;
-
-    public AbstractRepositoryReportsTestCase( String basedir, String[] directoryStructure )
-    {
-        this.basedir = basedir;
-        this.directoryStructure = directoryStructure;
-    }
+    /**
+     * This should only be used for the few that can't use the query layer.
+     */
+    protected ArtifactRepository repository;
 
     protected void setUp()
         throws Exception
     {
         super.setUp();
-        buildTestRepoPath();
-    }
+        File repositoryDirectory = getTestFile( "src/test/repository" );
 
-    private void buildTestRepoPath()
-    {
-        for ( int i = 0; i < directoryStructure.length; i++ )
-        {
-            File dir = new File( basedir + directoryStructure[i] );
-            if ( !dir.exists() )
-            {
-                dir.mkdirs();
-            }
-        }
-    }
+        ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE );
+        ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE, "default" );
 
-    private void deleteTestRepoPath() throws Exception
-    {
-        FileUtils.deleteDirectory( basedir );
+        repository =
+            factory.createArtifactRepository( "test", repositoryDirectory.toURL().toString(), layout, null, null );
     }
 
-    protected boolean writeTestArtifact( String relativePath, String artifactId )
-        throws Exception
-    {
-        File artifact = new File( basedir + relativePath + artifactId + JAR );
-        System.out.println( "" + basedir + relativePath + artifactId );
-        return artifact.createNewFile();
-    }
-
-    protected void tearDown()
-        throws Exception
-    {
-        deleteTestRepoPath();
-        super.tearDown();
-    }
 }

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/BadMetadataReportProcessorTest.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/BadMetadataReportProcessorTest.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/BadMetadataReportProcessorTest.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/BadMetadataReportProcessorTest.java Sun Dec  4 17:41:43 2005
@@ -8,7 +8,6 @@
  * 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,
@@ -17,44 +16,55 @@
  * limitations under the License.
  */
 
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.List;
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.codehaus.plexus.PlexusTestCase;
+import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
+import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
+import org.apache.maven.artifact.repository.metadata.Versioning;
+
+import java.util.Iterator;
 
-public class BadMetadataReportProcessorTest extends PlexusTestCase
+public class BadMetadataReportProcessorTest
+    extends AbstractRepositoryReportsTestCase
 {
     protected ArtifactFactory artifactFactory;
-    private BadMetadataReportProcessor badMetadataReportProcessor;
 
-    public BadMetadataReportProcessorTest(String testName)
-    {
-        super(testName);
-    }
+    private MetadataReportProcessor badMetadataReportProcessor;
 
-    protected void setUp() throws Exception
+    protected void setUp()
+        throws Exception
     {
-        artifactFactory = (ArtifactFactory) getContainer().lookup( ArtifactFactory.ROLE );
-        
-        badMetadataReportProcessor = new TestBadMetadataReportProcessor( artifactFactory, 
-                                                                         new DefaultRepositoryQueryLayer() );
-    }
-    
-    protected RepositoryQueryLayer getRepositoryQueryLayer( List returnValues ) throws NoSuchMethodException
-    {
-        GenericMockObject mockObject = new GenericMockObject();
-        Method method = RepositoryQueryLayer.class.getMethod( "containsArtifact", null );
-        mockObject.setExpectedReturns( method, returnValues );
-        RepositoryQueryLayer queryLayer = (RepositoryQueryLayer) Proxy.newProxyInstance( this.getClassLoader(), 
-                                                                    new Class[] { RepositoryQueryLayer.class },
-                                                                    new GenericMockObject() );
-        return queryLayer;
+        super.setUp();
+
+        artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
+
+        badMetadataReportProcessor = (MetadataReportProcessor) lookup( MetadataReportProcessor.ROLE );
     }
 
-    protected void tearDown() throws Exception
+    public void testMetadataMissingADirectory()
+        throws ReportProcessorException
     {
-        release( artifactFactory );
+        ArtifactReporter reporter = new MockArtifactReporter();
+
+        Artifact artifact = artifactFactory.createBuildArtifact( "groupId", "artifactId", "1.0-alpha-1", "type" );
+
+        Versioning versioning = new Versioning();
+        versioning.addVersion( "1.0-alpha-1" );
+        versioning.setLastUpdated( "20050611.202020" );
+
+        RepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact, versioning );
+
+        badMetadataReportProcessor.processMetadata( metadata, repository, reporter );
+
+        Iterator failures = reporter.getRepositoryMetadataFailureIterator();
+        assertTrue( "check there is a failure", failures.hasNext() );
+        RepositoryMetadataResult result = (RepositoryMetadataResult) failures.next();
+        assertEquals( "check metadata", metadata, result.getMetadata() );
+        // TODO: should be more robust
+        assertEquals( "check reason",
+                      "Artifact version 1.0-alpha-2 found in the repository but missing in the metadata.",
+                      result.getReason() );
+        assertFalse( "check no more failures", failures.hasNext() );
     }
 
     public void testProcessMetadata()
@@ -76,5 +86,5 @@
     public void testCheckRepositoryVersions()
     {
     }
-    
+
 }

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java?rev=353954&view=auto
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java (added)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java Sun Dec  4 17:41:43 2005
@@ -0,0 +1,106 @@
+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.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 reason )
+    {
+        artifactWarnings.add( new ArtifactResult( artifact, reason ) );
+    }
+
+    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 reason )
+    {
+        metadataWarnings.add( new RepositoryMetadataResult( metadata, reason ) );
+    }
+
+    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();
+    }
+}

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockArtifactReporter.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java?rev=353954&r1=353953&r2=353954&view=diff
==============================================================================
--- maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java (original)
+++ maven/repository-manager/trunk/maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/MockRepositoryQueryLayer.java Sun Dec  4 17:41:43 2005
@@ -18,9 +18,9 @@
 
 import org.apache.maven.artifact.Artifact;
 
-import java.util.List;
-import java.util.Iterator;
 import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * @author <a href="mailto:jtolentino@mergere.com">John Tolentino</a>
@@ -29,6 +29,7 @@
     implements RepositoryQueryLayer
 {
     private List queryConditions;
+
     private Iterator iterator;
 
     public MockRepositoryQueryLayer()
@@ -54,7 +55,7 @@
 
     public void addReturnValue( boolean queryCondition )
     {
-        queryConditions.add( new Boolean( queryCondition ) );
+        queryConditions.add( Boolean.valueOf( queryCondition ) );
     }
 
     public void clearList()

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-1/artifactId-1.0-alpha-1.pom
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-1/artifactId-1.0-alpha-1.pom?rev=353954&view=auto
==============================================================================
    (empty)

Added: maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-2/artifactId-1.0-alpha-2.pom
URL: http://svn.apache.org/viewcvs/maven/repository-manager/trunk/maven-repository-reports-standard/src/test/repository/groupId/artifactId/1.0-alpha-2/artifactId-1.0-alpha-2.pom?rev=353954&view=auto
==============================================================================
    (empty)



Mime
View raw message