archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r640819 - in /maven/archiva/trunk: archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/ archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ archiva-base/archiva-consum...
Date Tue, 25 Mar 2008 14:01:35 GMT
Author: brett
Date: Tue Mar 25 07:01:23 2008
New Revision: 640819

URL: http://svn.apache.org/viewvc?rev=640819&view=rev
Log:
[MRM-746] unable to include *.xml in artifacts list as it picks up maven-metadata.xml
- consolidate operations that checked if something was an artifact into FileTypes
- add exclusions for the metadata and supporting files to consumers
- add tests
Merged from: r640793

Added:
    maven/archiva/trunk/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java
      - copied, changed from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java
      - copied, changed from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumerTest.java
      - copied unchanged from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumerTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/MetadataUpdateConsumerTest.java
      - copied unchanged from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/MetadataUpdateConsumerTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java
      - copied, changed from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/test/resources/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.xml
      - copied unchanged from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-database-consumers/src/test/resources/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.xml
Modified:
    maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/AbstractMonitoredConsumer.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/MetadataUpdaterConsumer.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurgeTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.xml
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml
    maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
    maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedDefaultRepositoryContent.java
    maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedLegacyRepositoryContent.java
    maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java
    maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/MetadataTools.java
    maven/archiva/trunk/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java
    maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java
    maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactsConsumer.java
    maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java

Modified: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java Tue Mar 25 07:01:23 2008
@@ -34,8 +34,11 @@
 import org.apache.maven.archiva.configuration.io.registry.ConfigurationRegistryReader;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.registry.Registry;
 import org.codehaus.plexus.registry.RegistryException;
+import org.codehaus.plexus.registry.RegistryListener;
 import org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry;
+import org.codehaus.plexus.util.SelectorUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,7 +51,7 @@
  * @plexus.component role="org.apache.maven.archiva.configuration.FileTypes"
  */
 public class FileTypes
-    implements Initializable
+    implements Initializable, RegistryListener
 {
     private Logger log = LoggerFactory.getLogger(FileTypes.class);
     
@@ -70,11 +73,18 @@
      */
     private Map<String, List<String>> defaultTypeMap = new HashMap<String, List<String>>();
 
+    private List<String> artifactPatterns;
+
+    public void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration )
+    {
+        this.archivaConfiguration = archivaConfiguration;
+    }
+
     /**
      * <p>
      * Get the list of patterns for a specified filetype.
      * </p>
-     * 
+     *
      * <p>
      * You will always get a list.  In this order.
      *   <ul>
@@ -83,7 +93,7 @@
      *     <li>A single item list of <code>"**<span>/</span>*"</code></li>
      *   </ul>
      * </p>
-     * 
+     *
      * @param id the id to lookup.
      * @return the list of patterns.
      */
@@ -109,11 +119,33 @@
         return defaultPatterns;
     }
 
+    public synchronized boolean matchesArtifactPattern( String relativePath )
+    {
+        // Correct the slash pattern.
+        relativePath = relativePath.replace( '\\', '/' );
+
+        if ( artifactPatterns == null )
+        {
+            artifactPatterns = getFileTypePatterns( ARTIFACTS );
+        }
+        
+        for ( String pattern : artifactPatterns )
+        {
+            if ( SelectorUtils.matchPath( pattern, relativePath, false ) )
+            {
+                // Found match
+                return true;
+            }
+        }
+
+        // No match.
+        return false;
+    }
+
     public void initialize()
         throws InitializationException
     {
-        /* Initialize Default Type Map */
-        defaultTypeMap.clear();
+        // TODO: why is this done by hand?
 
         String errMsg = "Unable to load default archiva configuration for FileTypes: ";
         
@@ -132,19 +164,7 @@
             ConfigurationRegistryReader configReader = new ConfigurationRegistryReader();
             Configuration defaultConfig = configReader.read( commonsRegistry );
 
-            // Store the default file type declaration.
-            List<FileType> filetypes = defaultConfig.getRepositoryScanning().getFileTypes();
-            for ( FileType filetype : filetypes )
-            {
-                List<String> patterns = defaultTypeMap.get( filetype.getId() );
-                if ( patterns == null )
-                {
-                    patterns = new ArrayList<String>();
-                }
-                patterns.addAll( filetype.getPatterns() );
-
-                defaultTypeMap.put( filetype.getId(), patterns );
-            }
+            initialiseTypeMap( defaultConfig );
         }
         catch ( RegistryException e )
         {
@@ -166,5 +186,41 @@
         {
             throw new InitializationException( errMsg + e.getMessage(), e );
         }
+
+        this.archivaConfiguration.addChangeListener( this );
+    }
+
+    private void initialiseTypeMap( Configuration configuration )
+    {
+        defaultTypeMap.clear();
+
+        // Store the default file type declaration.
+        List<FileType> filetypes = configuration.getRepositoryScanning().getFileTypes();
+        for ( FileType filetype : filetypes )
+        {
+            List<String> patterns = defaultTypeMap.get( filetype.getId() );
+            if ( patterns == null )
+            {
+                patterns = new ArrayList<String>();
+            }
+            patterns.addAll( filetype.getPatterns() );
+
+            defaultTypeMap.put( filetype.getId(), patterns );
+        }
+    }
+
+    public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
+    {
+        if ( propertyName.contains( "fileType" ) )
+        {
+            artifactPatterns = null;
+
+            initialiseTypeMap( archivaConfiguration.getConfiguration() );
+        }
+    }
+
+    public void beforeConfigurationChange( Registry registry, String propertyName, Object propertyValue )
+    {
+        /* nothing to do */
     }
 }

Copied: maven/archiva/trunk/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java (from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java)
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java?p2=maven/archiva/trunk/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java&p1=maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java&r1=640793&r2=640819&rev=640819&view=diff
==============================================================================
--- maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java Tue Mar 25 07:01:23 2008
@@ -19,10 +19,10 @@
  * under the License.
  */
 
-import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
 public class FileTypesTest
-    extends PlexusTestCase
+    extends PlexusInSpringTestCase
 {
     private FileTypes filetypes;
 

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/AbstractMonitoredConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/AbstractMonitoredConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/AbstractMonitoredConsumer.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/maven/archiva/consumers/AbstractMonitoredConsumer.java Tue Mar 25 07:01:23 2008
@@ -19,8 +19,10 @@
  * under the License.
  */
 
+import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -34,6 +36,15 @@
 {
     private Set<ConsumerMonitor> monitors = new HashSet<ConsumerMonitor>();
 
+    /**
+     * Default exclusions from artifact consumers that are using the file types. Note that this is simplistic in the
+     * case of the support files (based on extension) as it is elsewhere - it may be better to match these to actual
+     * artifacts and exclude later during scanning.
+     */
+    private static final List<String> DEFAULT_EXCLUSIONS = Arrays.asList( "**/maven-metadata.xml",
+                                                                          "**/maven-metadata-*.xml", "**/*.sha1",
+                                                                          "**/*.asc", "**/*.md5", "**/*.pgp" );
+
     public void addConsumerMonitor( ConsumerMonitor monitor )
     {
         monitors.add( monitor );
@@ -95,5 +106,10 @@
     public boolean isProcessUnmodified()
     {
         return false;
+    }
+
+    protected List<String> getDefaultArtifactExclusions()
+    {
+        return DEFAULT_EXCLUSIONS;
     }
 }

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java Tue Mar 25 07:01:23 2008
@@ -126,7 +126,7 @@
 
     public List<String> getExcludes()
     {
-        return null;
+        return getDefaultArtifactExclusions();
     }
 
     public List<String> getIncludes()

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/MetadataUpdaterConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/MetadataUpdaterConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/MetadataUpdaterConsumer.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/MetadataUpdaterConsumer.java Tue Mar 25 07:01:23 2008
@@ -149,7 +149,7 @@
 
     public List<String> getExcludes()
     {
-        return null;
+        return getDefaultArtifactExclusions();
     }
 
     public List<String> getIncludes()

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java Tue Mar 25 07:01:23 2008
@@ -125,7 +125,7 @@
 
     public List<String> getExcludes()
     {
-        return null;
+        return getDefaultArtifactExclusions();
     }
 
     public List<String> getIncludes()

Copied: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java (from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java)
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java?p2=maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java&p1=maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java&r1=640793&r2=640819&rev=640819&view=diff
==============================================================================
--- maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/AbstractArtifactConsumerTest.java Tue Mar 25 07:01:23 2008
@@ -25,12 +25,12 @@
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.repository.scanner.functors.ConsumerWantsFilePredicate;
-import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
 import java.io.File;
 
 public abstract class AbstractArtifactConsumerTest
-    extends PlexusTestCase
+    extends PlexusInSpringTestCase
 {
     private File repoLocation;
 

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurgeTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurgeTest.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurgeTest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/DaysOldRepositoryPurgeTest.java Tue Mar 25 07:01:23 2008
@@ -19,6 +19,10 @@
  * under the License.
  */
 
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexStub;
+import org.apache.maven.archiva.indexer.RepositoryContentIndex;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -27,10 +31,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexStub;
-import org.apache.maven.archiva.indexer.RepositoryContentIndex;
-
 /**
  * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
  */
@@ -270,5 +270,5 @@
         versions.add( "2.2-SNAPSHOT" );
 
         populateDb( "org.apache.maven.plugins", "maven-install-plugin", versions );
-    }    
+    }
 }

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java Tue Mar 25 07:01:23 2008
@@ -20,12 +20,16 @@
  */
 
 import org.apache.commons.io.FileUtils;
+import org.apache.maven.archiva.common.utils.BaseFile;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.FileType;
+import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.consumers.core.repository.stubs.LuceneRepositoryContentIndexFactoryStub;
 import org.apache.maven.archiva.database.ArchivaDatabaseException;
+import org.apache.maven.archiva.repository.scanner.functors.ConsumerWantsFilePredicate;
 import org.custommonkey.xmlunit.XMLAssert;
 
 import java.io.File;
@@ -38,6 +42,46 @@
 public class RepositoryPurgeConsumerTest
     extends AbstractRepositoryPurgeTest
 {
+    public void testConsumption()
+        throws Exception
+    {
+        assertNotConsumed( "org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-metadata.xml" );
+    }
+
+    public void testConsumptionOfOtherMetadata()
+        throws Exception
+    {
+        assertNotConsumed( "org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-metadata-central.xml" );
+    }
+
+    private void assertNotConsumed( String path )
+        throws Exception
+    {
+        ArchivaConfiguration archivaConfiguration = (ArchivaConfiguration) lookup( ArchivaConfiguration.ROLE );
+        FileType fileType =
+            (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
+        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );
+        fileType.addPattern( "**/*.xml" );
+
+        // trigger reload
+        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
+        fileTypes.afterConfigurationChange( null, "repositoryScanning.fileTypes", null );
+
+        KnownRepositoryContentConsumer repoPurgeConsumer =
+            (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class, "repository-purge" );
+
+        File repoLocation = getTestFile( "target/test-" + getName() + "/test-repo" );
+
+        File localFile =
+            new File( repoLocation, path );
+
+        ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate();
+        BaseFile baseFile = new BaseFile( repoLocation, localFile );
+        predicate.setBasefile( baseFile );
+
+        assertFalse( predicate.evaluate( repoPurgeConsumer ) );
+    }
+
     private void setLastModified( String path )
     {
         File dir = new File( path );
@@ -168,7 +212,7 @@
 
     /**
      * Test the snapshot clean consumer on a repository set to NOT clean/delete snapshots based on released versions.
-     * 
+     *
      * @throws Exception
      */
     public void testReleasedSnapshotsWereNotCleaned()

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.xml?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.xml (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.xml Tue Mar 25 07:01:23 2008
@@ -44,6 +44,7 @@
         </requirement>
         <requirement>
           <role>org.apache.maven.archiva.configuration.FileTypes</role>
+          <role-hint>retention-count</role-hint>
         </requirement>
         <requirement>
           <role>org.apache.maven.archiva.indexer.RepositoryContentIndexFactory</role>
@@ -101,6 +102,7 @@
     </component>
     <component>
       <role>org.apache.maven.archiva.configuration.FileTypes</role>
+      <role-hint>retention-count</role-hint>
       <implementation>org.apache.maven.archiva.configuration.FileTypes</implementation>
       <requirements>
         <requirement>
@@ -134,6 +136,7 @@
         </requirement>
         <requirement>
           <role>org.apache.maven.archiva.configuration.FileTypes</role>
+          <role-hint>days-old</role-hint>
         </requirement>
         <requirement>
           <role>org.apache.maven.archiva.indexer.RepositoryContentIndexFactory</role>
@@ -191,6 +194,7 @@
     </component>
     <component>
       <role>org.apache.maven.archiva.configuration.FileTypes</role>
+      <role-hint>days-old</role-hint>
       <implementation>org.apache.maven.archiva.configuration.FileTypes</implementation>
       <requirements>
         <requirement>

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml Tue Mar 25 07:01:23 2008
@@ -53,5 +53,10 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-digest</artifactId>
     </dependency>
+    <dependency>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>

Modified: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumer.java Tue Mar 25 07:01:23 2008
@@ -128,7 +128,7 @@
 
     public List<String> getExcludes()
     {
-        return null;
+        return getDefaultArtifactExclusions();
     }
 
     public List<String> getIncludes()

Copied: maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java (from r640793, maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java)
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java?p2=maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java&p1=maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java&r1=640793&r2=640819&rev=640819&view=diff
==============================================================================
--- maven/archiva/branches/archiva-1.0.x/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ArtifactUpdateDatabaseConsumerTest.java Tue Mar 25 07:01:23 2008
@@ -25,12 +25,12 @@
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.repository.scanner.functors.ConsumerWantsFilePredicate;
-import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
 import java.io.File;
 
 public class ArtifactUpdateDatabaseConsumerTest
-    extends PlexusTestCase
+    extends PlexusInSpringTestCase
 {
     private File repoLocation;
 

Modified: maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedDefaultRepositoryContent.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedDefaultRepositoryContent.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedDefaultRepositoryContent.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedDefaultRepositoryContent.java Tue Mar 25 07:01:23 2008
@@ -30,16 +30,10 @@
 import org.apache.maven.archiva.repository.ContentNotFoundException;
 import org.apache.maven.archiva.repository.ManagedRepositoryContent;
 import org.apache.maven.archiva.repository.layout.LayoutException;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.util.SelectorUtils;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 /**
@@ -55,7 +49,7 @@
  */
 public class ManagedDefaultRepositoryContent
     extends AbstractDefaultRepositoryContent
-    implements ManagedRepositoryContent, Initializable
+    implements ManagedRepositoryContent
 {
     /**
      * @plexus.requirement
@@ -64,8 +58,6 @@
 
     private ManagedRepositoryConfiguration repository;
 
-    private List<String> artifactPatterns;
-
     public void deleteVersion( VersionedReference reference )
         throws ContentNotFoundException
     {
@@ -123,7 +115,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFiles[i] );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 ArtifactReference artifact = toArtifactReference( relativePath );
                 
@@ -250,7 +242,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFiles[i] );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 ArtifactReference artifact = toArtifactReference( relativePath );
 
@@ -300,13 +292,6 @@
         }
     }
 
-    public void initialize()
-        throws InitializationException
-    {
-        this.artifactPatterns = new ArrayList<String>();
-        initVariables();
-    }
-
     public void setRepository( ManagedRepositoryConfiguration repository )
     {
         this.repository = repository;
@@ -386,7 +371,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFiles[i] );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 ArtifactReference artifact = toArtifactReference( relativePath );
 
@@ -409,36 +394,5 @@
         {
             return false;
         }
-    }
-
-    private void initVariables()
-    {
-        synchronized ( this.artifactPatterns )
-        {
-            this.artifactPatterns.clear();
-
-            this.artifactPatterns.addAll( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) );
-        }
-    }
-
-    private boolean matchesArtifactPattern( String relativePath )
-    {
-        // Correct the slash pattern.
-        relativePath = relativePath.replace( '\\', '/' );
-
-        Iterator<String> it = this.artifactPatterns.iterator();
-        while ( it.hasNext() )
-        {
-            String pattern = it.next();
-
-            if ( SelectorUtils.matchPath( pattern, relativePath, false ) )
-            {
-                // Found match
-                return true;
-            }
-        }
-
-        // No match.
-        return false;
     }
 }

Modified: maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedLegacyRepositoryContent.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedLegacyRepositoryContent.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedLegacyRepositoryContent.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/ManagedLegacyRepositoryContent.java Tue Mar 25 07:01:23 2008
@@ -31,15 +31,9 @@
 import org.apache.maven.archiva.repository.ContentNotFoundException;
 import org.apache.maven.archiva.repository.ManagedRepositoryContent;
 import org.apache.maven.archiva.repository.layout.LayoutException;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.util.SelectorUtils;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 /**
@@ -55,7 +49,7 @@
  */
 public class ManagedLegacyRepositoryContent
     extends AbstractLegacyRepositoryContent
-    implements ManagedRepositoryContent, Initializable
+    implements ManagedRepositoryContent
 {
     /**
      * @plexus.requirement
@@ -64,8 +58,6 @@
 
     private ManagedRepositoryConfiguration repository;
 
-    private List<String> artifactPatterns;
-
     public void deleteVersion( VersionedReference reference )
         throws ContentNotFoundException
     {
@@ -115,7 +107,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFile );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 try
                 {
@@ -321,13 +313,6 @@
         }
     }
 
-    public void initialize()
-        throws InitializationException
-    {
-        this.artifactPatterns = new ArrayList<String>();
-        initVariables();
-    }
-
     public void setRepository( ManagedRepositoryConfiguration repository )
     {
         this.repository = repository;
@@ -386,7 +371,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFile );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 try
                 {
@@ -417,7 +402,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFiles[i] );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 try
                 {
@@ -449,7 +434,7 @@
 
             String relativePath = PathUtil.getRelative( repository.getLocation(), repoFiles[i] );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 try
                 {
@@ -466,36 +451,5 @@
                 }
             }
         }
-    }
-
-    private void initVariables()
-    {
-        synchronized ( this.artifactPatterns )
-        {
-            this.artifactPatterns.clear();
-
-            this.artifactPatterns.addAll( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) );
-        }
-    }
-
-    private boolean matchesArtifactPattern( String relativePath )
-    {
-        // Correct the slash pattern.
-        relativePath = relativePath.replace( '\\', '/' );
-
-        Iterator<String> it = this.artifactPatterns.iterator();
-        while ( it.hasNext() )
-        {
-            String pattern = it.next();
-
-            if ( SelectorUtils.matchPath( pattern, relativePath, false ) )
-            {
-                // Found match
-                return true;
-            }
-        }
-
-        // No match.
-        return false;
     }
 }

Modified: maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/RepositoryRequest.java Tue Mar 25 07:01:23 2008
@@ -26,15 +26,6 @@
 import org.apache.maven.archiva.repository.ManagedRepositoryContent;
 import org.apache.maven.archiva.repository.layout.LayoutException;
 import org.apache.maven.archiva.repository.metadata.MetadataTools;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.registry.Registry;
-import org.codehaus.plexus.registry.RegistryListener;
-import org.codehaus.plexus.util.SelectorUtils;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
 
 /**
  * RepositoryRequest is used to determine the type of request that is incoming, and convert it to an appropriate
@@ -47,7 +38,6 @@
  *      role="org.apache.maven.archiva.repository.content.RepositoryRequest"
  */
 public class RepositoryRequest
-    implements RegistryListener, Initializable
 {
     /**
      * @plexus.requirement
@@ -69,35 +59,6 @@
      */
     private PathParser legacyPathParser;
 
-    private List<String> artifactPatterns;
-
-    /**
-     * Test path to see if it is an artifact being requested (or not).
-     *
-     * @param requestedPath the path to test.
-     * @return true if it is an artifact being requested.
-     */
-    public boolean isArtifact( String requestedPath )
-    {
-        // Correct the slash pattern.
-        String relativePath = requestedPath.replace( '\\', '/' );
-
-        Iterator<String> it = this.artifactPatterns.iterator();
-        while ( it.hasNext() )
-        {
-            String pattern = it.next();
-
-            if ( SelectorUtils.matchPath( pattern, relativePath, false ) )
-            {
-                // Found match
-                return true;
-            }
-        }
-
-        // No match.
-        return false;
-    }
-
     /**
      * Takes an incoming requested path (in "/" format) and gleans the layout
      * and ArtifactReference appropriate for that content.
@@ -281,36 +242,5 @@
         ArtifactReference ref = toArtifactReference( referencedResource );
         String adjustedPath = repository.toPath( ref );
         return adjustedPath + supportfile;
-    }
-
-    public void initialize()
-        throws InitializationException
-    {
-        this.artifactPatterns = new ArrayList<String>();
-        initVariables();
-        this.archivaConfiguration.addChangeListener( this );
-    }
-
-    private void initVariables()
-    {
-        synchronized ( this.artifactPatterns )
-        {
-            this.artifactPatterns.clear();
-            this.artifactPatterns.addAll( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) );
-        }
-    }
-
-    public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
-    {
-        if ( propertyName.contains( "fileType" ) )
-        {
-            initVariables();
-        }
-    }
-
-    public void beforeConfigurationChange( Registry registry, String propertyName, Object propertyValue )
-    {
-        /* nothing to do */
-
     }
 }

Modified: maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/MetadataTools.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/MetadataTools.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/MetadataTools.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/metadata/MetadataTools.java Tue Mar 25 07:01:23 2008
@@ -45,7 +45,6 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.registry.Registry;
 import org.codehaus.plexus.registry.RegistryListener;
-import org.codehaus.plexus.util.SelectorUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -799,7 +798,7 @@
 
             String relativePath = PathUtil.getRelative( managedRepository.getRepoRoot(), repoFiles[i] );
 
-            if ( matchesArtifactPattern( relativePath ) )
+            if ( filetypes.matchesArtifactPattern( relativePath ) )
             {
                 ArtifactReference artifact = managedRepository.toArtifactReference( relativePath );
 
@@ -809,26 +808,5 @@
 
         // No artifact was found.
         return null;
-    }
-
-    private boolean matchesArtifactPattern( String relativePath )
-    {
-        // Correct the slash pattern.
-        relativePath = relativePath.replace( '\\', '/' );
-
-        Iterator<String> it = this.artifactPatterns.iterator();
-        while ( it.hasNext() )
-        {
-            String pattern = it.next();
-
-            if ( SelectorUtils.matchPath( pattern, relativePath, false ) )
-            {
-                // Found match
-                return true;
-            }
-        }
-
-        // No match.
-        return false;
     }
 }

Modified: maven/archiva/trunk/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java (original)
+++ maven/archiva/trunk/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/RepositoryRequestTest.java Tue Mar 25 07:01:23 2008
@@ -209,20 +209,6 @@
                      "org.apache.archiva.test", "redonkulous", "3.1-beta-1-20050831.101112-42", null, "jar" );
     }
 
-    public void testIsArtifact()
-    {
-        assertTrue( repoRequest.isArtifact( "test.maven-arch/poms/test-arch-2.0.3-SNAPSHOT.pom" ) );
-        assertTrue( repoRequest.isArtifact( "test/maven-arch/test-arch/2.0.3-SNAPSHOT/test-arch-2.0.3-SNAPSHOT.jar" ) );
-        assertTrue( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) );
-
-        assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) );
-        assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) );
-        assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.asc" ) );
-        assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.pgp" ) );
-        assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) );
-        assertFalse( repoRequest.isArtifact( "org/apache/derby/derby/maven-metadata.xml" ) );
-    }
-
     public void testIsSupportFile()
     {
         assertTrue( repoRequest.isSupportFile( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) );

Modified: maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java (original)
+++ maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java Tue Mar 25 07:01:23 2008
@@ -52,6 +52,7 @@
 
     public ArtifactCountConsumer()
     {
+        // TODO: shouldn't this use filetypes?
         includes = new ArrayList();
         includes.add( "**/*.pom" );
         includes.add( "**/*.jar" );

Modified: maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactsConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactsConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactsConsumer.java (original)
+++ maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/DuplicateArtifactsConsumer.java Tue Mar 25 07:01:23 2008
@@ -90,6 +90,7 @@
      */
     private RepositoryContentFactory repositoryFactory;
 
+    // TODO: why is this not used? If it should be, what about excludes?
     private List<String> includes = new ArrayList<String>();
 
     public String getId()

Modified: maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java?rev=640819&r1=640818&r2=640819&view=diff
==============================================================================
--- maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java (original)
+++ maven/archiva/trunk/archiva-reporting/archiva-artifact-reports/src/main/java/org/apache/maven/archiva/reporting/artifact/LocationArtifactsConsumer.java Tue Mar 25 07:01:23 2008
@@ -101,6 +101,7 @@
 
     private Map repositoryMap = new HashMap();
 
+    // TODO: why is this not used? If it should be, what about excludes?
     private List<String> includes = new ArrayList<String>();
 
     public String getId()



Mime
View raw message