aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2007-09-28 00:12:03 +0000
committerBrett Porter <brett@apache.org>2007-09-28 00:12:03 +0000
commitbc5df1bd8a86691788fbfd00b15911fb96e890ff (patch)
treea97eaa2a073f3d9ad9a09e7237861f56099e835e
parent15e551e98364ac19b76de71fee10137a873fa4d4 (diff)
downloadarchiva-bc5df1bd8a86691788fbfd00b15911fb96e890ff.tar.gz
archiva-bc5df1bd8a86691788fbfd00b15911fb96e890ff.zip
[MRM-528] run consumers as artifacts arrive via proxy
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@580187 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-base/archiva-configuration/pom.xml6
-rw-r--r--archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/AbstractRepositoryPurge.java2
-rw-r--r--archiva-base/archiva-dependency-graph/pom.xml5
-rw-r--r--archiva-base/archiva-indexer/pom.xml5
-rw-r--r--archiva-base/archiva-policies/pom.xml5
-rw-r--r--archiva-base/archiva-proxy/pom.xml5
-rw-r--r--archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java9
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.xml4
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ChecksumTransferTest.xml4
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.xml4
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.xml4
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/MetadataTransferTest.xml4
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/RelocateTransferTest.xml4
-rw-r--r--archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/SnapshotTransferTest.xml4
-rw-r--r--archiva-base/archiva-repository-layer/pom.xml5
-rw-r--r--archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java54
-rw-r--r--archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumerUtilTest.java45
-rwxr-xr-xarchiva-reporting/archiva-artifact-reports/pom.xml5
-rw-r--r--archiva-web/archiva-webapp/pom.xml6
-rw-r--r--archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/StubRepositoryContentConsumers.java8
-rw-r--r--archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/repository/RepositoryServletTest.xml7
-rw-r--r--pom.xml11
22 files changed, 151 insertions, 55 deletions
diff --git a/archiva-base/archiva-configuration/pom.xml b/archiva-base/archiva-configuration/pom.xml
index 8213a04ba..6d6fbdcea 100644
--- a/archiva-base/archiva-configuration/pom.xml
+++ b/archiva-base/archiva-configuration/pom.xml
@@ -72,12 +72,6 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</dependency>
- <!-- Test Deps -->
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
diff --git a/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/AbstractRepositoryPurge.java b/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/AbstractRepositoryPurge.java
index 7a0a1d7c4..5bfd82675 100644
--- a/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/AbstractRepositoryPurge.java
+++ b/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/AbstractRepositoryPurge.java
@@ -113,6 +113,8 @@ public abstract class AbstractRepositoryPurge
artifact.getType() );
artifactDao.deleteArtifact( queriedArtifact );
+
+ // TODO [MRM-37]: re-run the database consumers to clean up
}
/**
diff --git a/archiva-base/archiva-dependency-graph/pom.xml b/archiva-base/archiva-dependency-graph/pom.xml
index 9428115fb..35463c86b 100644
--- a/archiva-base/archiva-dependency-graph/pom.xml
+++ b/archiva-base/archiva-dependency-graph/pom.xml
@@ -80,11 +80,6 @@
<artifactId>plexus-registry-commons</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
diff --git a/archiva-base/archiva-indexer/pom.xml b/archiva-base/archiva-indexer/pom.xml
index 9f725fa11..1f1a393c1 100644
--- a/archiva-base/archiva-indexer/pom.xml
+++ b/archiva-base/archiva-indexer/pom.xml
@@ -60,11 +60,6 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
diff --git a/archiva-base/archiva-policies/pom.xml b/archiva-base/archiva-policies/pom.xml
index 50ab5c3b0..dd85bd0b1 100644
--- a/archiva-base/archiva-policies/pom.xml
+++ b/archiva-base/archiva-policies/pom.xml
@@ -45,11 +45,6 @@
<artifactId>plexus-cache-ehcache</artifactId>
</dependency>
<dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<scope>test</scope>
diff --git a/archiva-base/archiva-proxy/pom.xml b/archiva-base/archiva-proxy/pom.xml
index b36e2252f..2d604bb6b 100644
--- a/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-base/archiva-proxy/pom.xml
@@ -77,11 +77,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<scope>test</scope>
diff --git a/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
index 12c08be58..96117c89f 100644
--- a/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
+++ b/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
@@ -39,6 +39,7 @@ import org.apache.maven.archiva.repository.layout.BidirectionalRepositoryLayoutF
import org.apache.maven.archiva.repository.layout.LayoutException;
import org.apache.maven.archiva.repository.metadata.MetadataTools;
import org.apache.maven.archiva.repository.metadata.RepositoryMetadataException;
+import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.maven.wagon.ConnectionException;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.Wagon;
@@ -116,6 +117,11 @@ public class DefaultRepositoryProxyConnectors
private Map networkProxyMap = new HashMap();
/**
+ * @plexus.requirement
+ */
+ private RepositoryContentConsumers consumers;
+
+ /**
* Fetch an artifact from a remote repository.
*
* @param repository the managed repository to utilize for the request.
@@ -475,6 +481,9 @@ public class DefaultRepositoryProxyConnectors
return null;
}
+ // Just-in-time update of the index and database by executing the consumers for this artifact
+ consumers.executeConsumers( connector.getSourceRepository(), localFile );
+
// Everything passes.
return localFile;
}
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.xml
index a17f85658..f41c3f468 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/CacheFailuresTransferTest.xml
@@ -61,6 +61,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ChecksumTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ChecksumTransferTest.xml
index 4219308ab..9d89522d0 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ChecksumTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ChecksumTransferTest.xml
@@ -61,6 +61,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.xml
index 4219308ab..9d89522d0 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedDefaultTransferTest.xml
@@ -61,6 +61,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.xml
index 4219308ab..9d89522d0 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/ManagedLegacyTransferTest.xml
@@ -61,6 +61,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/MetadataTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/MetadataTransferTest.xml
index 2926013c1..67e6ccbb1 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/MetadataTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/MetadataTransferTest.xml
@@ -87,6 +87,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/RelocateTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/RelocateTransferTest.xml
index bbb1fade7..2c3c5cffa 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/RelocateTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/RelocateTransferTest.xml
@@ -65,6 +65,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/SnapshotTransferTest.xml b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/SnapshotTransferTest.xml
index 4219308ab..9d89522d0 100644
--- a/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/SnapshotTransferTest.xml
+++ b/archiva-base/archiva-proxy/src/test/resources/org/apache/maven/archiva/proxy/SnapshotTransferTest.xml
@@ -61,6 +61,10 @@
<role-hint>default</role-hint>
<field-name>urlFailureCache</field-name>
</requirement>
+ <requirement>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <field-name>consumers</field-name>
+ </requirement>
</requirements>
</component>
diff --git a/archiva-base/archiva-repository-layer/pom.xml b/archiva-base/archiva-repository-layer/pom.xml
index 8a5c125e8..86cbe2cce 100644
--- a/archiva-base/archiva-repository-layer/pom.xml
+++ b/archiva-base/archiva-repository-layer/pom.xml
@@ -89,11 +89,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<version>1.1-alpha-1</version>
diff --git a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
index 3f076cddb..6876a7294 100644
--- a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
+++ b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
@@ -24,16 +24,20 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.functors.IfClosure;
import org.apache.commons.collections.functors.OrPredicate;
+import org.apache.maven.archiva.common.utils.PathUtil;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
+import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
import org.apache.maven.archiva.consumers.functors.PermanentConsumerPredicate;
+import org.apache.maven.archiva.model.ArchivaRepository;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -59,12 +63,12 @@ public class RepositoryContentConsumers
/**
* @plexus.requirement role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
*/
- private List availableKnownConsumers;
+ private List<KnownRepositoryContentConsumer> availableKnownConsumers;
/**
* @plexus.requirement role="org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer"
*/
- private List availableInvalidConsumers;
+ private List<InvalidRepositoryContentConsumer> availableInvalidConsumers;
private Predicate selectedKnownPredicate;
@@ -186,13 +190,55 @@ public class RepositoryContentConsumers
return ret;
}
- public List getAvailableKnownConsumers()
+ public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers()
{
return availableKnownConsumers;
}
- public List getAvailableInvalidConsumers()
+ public List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers()
{
return availableInvalidConsumers;
}
+
+ public void setAvailableKnownConsumers( List<KnownRepositoryContentConsumer> availableKnownConsumers )
+ {
+ this.availableKnownConsumers = availableKnownConsumers;
+ }
+
+ public void setAvailableInvalidConsumers( List<InvalidRepositoryContentConsumer> availableInvalidConsumers )
+ {
+ this.availableInvalidConsumers = availableInvalidConsumers;
+ }
+
+ public void executeConsumers( ArchivaRepository repository, File localFile )
+ {
+ // Run the repository consumers
+ for ( RepositoryContentConsumer consumer : availableKnownConsumers )
+ {
+ consumeFile( consumer, repository, localFile );
+ }
+
+ for ( RepositoryContentConsumer consumer : availableInvalidConsumers )
+ {
+ consumeFile( consumer, repository, localFile );
+ }
+ }
+
+ private void consumeFile( RepositoryContentConsumer consumer, ArchivaRepository repository, File localFile )
+ {
+ try
+ {
+ consumer.beginScan( repository );
+ consumer.processFile( PathUtil.getRelative( repository.getUrl().getPath(), localFile ) );
+ }
+ catch ( ConsumerException e )
+ {
+ getLogger().error( "Error processing file: " + localFile, e );
+ // ignore, let next repo scan handle it
+ }
+ finally
+ {
+ consumer.completeScan();
+ }
+ }
}
diff --git a/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumerUtilTest.java b/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumerUtilTest.java
index 5d83a81e7..2f2a751bb 100644
--- a/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumerUtilTest.java
+++ b/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumerUtilTest.java
@@ -19,15 +19,20 @@ package org.apache.maven.archiva.repository.scanner;
* under the License.
*/
+import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
+import org.apache.maven.archiva.model.ArchivaRepository;
import org.codehaus.plexus.PlexusTestCase;
+import org.easymock.MockControl;
+import java.io.File;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
- * RepositoryContentConsumerUtilTest
+ * RepositoryContentConsumerUtilTest
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
@@ -71,7 +76,7 @@ public class RepositoryContentConsumerUtilTest
assertNotNull( "Known[sample-known] should not be null.", o );
assertInstanceof( "Known[sample-known]", RepositoryContentConsumer.class, o );
assertInstanceof( "Known[sample-known]", KnownRepositoryContentConsumer.class, o );
-
+
Map invalidConsumerMap = consumerutil.getSelectedInvalidConsumersMap();
assertNotNull( "Invalid Consumer Map should not be null", invalidConsumerMap );
assertEquals( "Invalid Consumer Map.size", 0, invalidConsumerMap.size() );
@@ -81,8 +86,8 @@ public class RepositoryContentConsumerUtilTest
{
if ( clazz.isInstance( o ) == false )
{
- fail( msg + ": Object [" + o.getClass().getName() + "] should have been an instanceof [" + clazz.getName()
- + "]" );
+ fail( msg + ": Object [" + o.getClass().getName() + "] should have been an instanceof [" + clazz.getName() +
+ "]" );
}
}
@@ -100,4 +105,36 @@ public class RepositoryContentConsumerUtilTest
assertNotNull( "invalid consumers should not be null.", invalidConsumers );
assertEquals( "invalid consumers", 0, invalidConsumers.size() );
}
+
+ public void testExecution()
+ throws Exception
+ {
+ MockControl knownControl = MockControl.createControl( KnownRepositoryContentConsumer.class );
+ RepositoryContentConsumers consumers = lookupRepositoryConsumerUtil();
+ KnownRepositoryContentConsumer knownConsumer = (KnownRepositoryContentConsumer) knownControl.getMock();
+ consumers.setAvailableKnownConsumers( Collections.singletonList( knownConsumer ) );
+
+ MockControl invalidControl = MockControl.createControl( InvalidRepositoryContentConsumer.class );
+ InvalidRepositoryContentConsumer invalidConsumer = (InvalidRepositoryContentConsumer) invalidControl.getMock();
+ consumers.setAvailableInvalidConsumers( Collections.singletonList( invalidConsumer ) );
+
+ ArchivaRepository repo =
+ new ArchivaRepository( "id", "name", getTestFile( "target/test-repo" ).toURL().toExternalForm() );
+ File testFile = getTestFile( "target/test-repo/path/to/test-file.txt" );
+
+ knownConsumer.beginScan( repo );
+ knownConsumer.processFile( "path/to/test-file.txt" );
+ knownConsumer.completeScan();
+ knownControl.replay();
+
+ invalidConsumer.beginScan( repo );
+ invalidConsumer.processFile( "path/to/test-file.txt" );
+ invalidConsumer.completeScan();
+ invalidControl.replay();
+
+ consumers.executeConsumers( repo, testFile );
+
+ knownControl.verify();
+ invalidControl.verify();
+ }
}
diff --git a/archiva-reporting/archiva-artifact-reports/pom.xml b/archiva-reporting/archiva-artifact-reports/pom.xml
index 93dbb2802..cf35b6e4c 100755
--- a/archiva-reporting/archiva-artifact-reports/pom.xml
+++ b/archiva-reporting/archiva-artifact-reports/pom.xml
@@ -59,11 +59,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-slf4j-logging</artifactId>
<scope>test</scope>
diff --git a/archiva-web/archiva-webapp/pom.xml b/archiva-web/archiva-webapp/pom.xml
index f1ce709a1..4024b4549 100644
--- a/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-web/archiva-webapp/pom.xml
@@ -235,12 +235,6 @@
<version>${redback.version}</version>
<scope>test</scope>
</dependency>
- <!-- Test Deps -->
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<plugins>
diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/StubRepositoryContentConsumers.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/StubRepositoryContentConsumers.java
new file mode 100644
index 000000000..342ed4363
--- /dev/null
+++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/repository/StubRepositoryContentConsumers.java
@@ -0,0 +1,8 @@
+package org.apache.maven.archiva.web.repository;
+
+import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
+
+public class StubRepositoryContentConsumers
+ extends RepositoryContentConsumers
+{
+}
diff --git a/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/repository/RepositoryServletTest.xml b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/repository/RepositoryServletTest.xml
index a86edac15..5356abb87 100644
--- a/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/repository/RepositoryServletTest.xml
+++ b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/repository/RepositoryServletTest.xml
@@ -38,6 +38,13 @@
</configuration>
</component>
+ <!-- Don't drag in the world just to test this -->
+ <component>
+ <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
+ <role-hint>default</role-hint>
+ <implementation>org.apache.maven.archiva.web.repository.StubRepositoryContentConsumers</implementation>
+ </component>
+
<!-- TODO: shouldn't need so many components just to use in-memory - is flaky since these are auto-generated -->
<component>
<role>org.codehaus.plexus.redback.system.SecuritySystem</role>
diff --git a/pom.xml b/pom.xml
index b24f1645d..bed2eed6f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -190,6 +190,12 @@
<version>3.8.1</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>1.2_Java1.3</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<dependencyManagement>
<dependencies>
@@ -371,11 +377,6 @@
<version>1.6.1</version>
</dependency>
<dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>1.2_Java1.3</version>
- </dependency>
- <dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>