diff --git a/archiva-modules/plugins/problem-reports/pom.xml b/archiva-modules/plugins/problem-reports/pom.xml
index cfea4e188..5cadb8bb5 100644
--- a/archiva-modules/plugins/problem-reports/pom.xml
+++ b/archiva-modules/plugins/problem-reports/pom.xml
@@ -41,21 +41,51 @@
org.apache.archiva
archiva-configuration
-
- org.apache.archiva
- archiva-repository-admin-api
-
org.apache.archiva
archiva-checksum
org.apache.archiva
- archiva-model
+ archiva-consumer-api
org.apache.archiva
- archiva-consumer-api
+ archiva-repository-api
+
+
+ org.apache.archiva
+ metadata-model
+
+
+
+ org.springframework
+ spring-beans
+
+
+ org.springframework
+ spring-context
+
+
+
+ javax.annotation
+ javax.annotation-api
+
+
+ javax.inject
+ javax.inject
+
+
+ org.apache.commons
+ commons-collections4
+
+
+
+
+
+ org.springframework
+ spring-test
+ test
org.apache.archiva
@@ -84,17 +114,6 @@
archiva-repository-layer
test
-
- org.apache.logging.log4j
- log4j-jcl
- test
-
-
-
- org.apache.archiva.components.cache
- archiva-components-spring-cache-ehcache
- test
-
org.apache.maven.wagon
diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
index d3d66aa7b..0e167a523 100644
--- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
+++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
@@ -21,8 +21,6 @@ package org.apache.archiva.reports.consumers;
import org.apache.archiva.checksum.ChecksumAlgorithm;
import org.apache.archiva.checksum.ChecksummedFile;
-import org.apache.archiva.configuration.ArchivaConfiguration;
-import org.apache.archiva.configuration.ConfigurationNames;
import org.apache.archiva.configuration.FileTypes;
import org.apache.archiva.consumers.AbstractMonitoredConsumer;
import org.apache.archiva.consumers.ConsumerException;
@@ -34,8 +32,6 @@ import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import org.apache.archiva.metadata.repository.RepositorySession;
import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator;
-import org.apache.archiva.components.registry.Registry;
-import org.apache.archiva.components.registry.RegistryListener;
import org.apache.archiva.repository.ManagedRepository;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
@@ -64,7 +60,7 @@ import java.util.List;
@Scope ( "prototype" )
public class DuplicateArtifactsConsumer
extends AbstractMonitoredConsumer
- implements KnownRepositoryContentConsumer, RegistryListener
+ implements KnownRepositoryContentConsumer
{
private Logger log = LoggerFactory.getLogger( DuplicateArtifactsConsumer.class );
@@ -72,9 +68,6 @@ public class DuplicateArtifactsConsumer
private String description = "Check for Duplicate Artifacts via SHA1 Checksums";
- @Inject
- private ArchivaConfiguration configuration;
-
@Inject
private FileTypes filetypes;
@@ -115,7 +108,7 @@ public class DuplicateArtifactsConsumer
@Override
public List getIncludes()
{
- return includes;
+ return filetypes.getFileTypePatterns( FileTypes.ARTIFACTS );
}
@Override
@@ -254,33 +247,11 @@ public class DuplicateArtifactsConsumer
completeScan();
}
- @Override
- public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
- {
- if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
- {
- initIncludes();
- }
- }
- @Override
- public void beforeConfigurationChange( Registry registry, String propertyName, Object propertyValue )
- {
- /* do nothing */
- }
-
- private void initIncludes()
- {
- includes.clear();
-
- includes.addAll( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) );
- }
@PostConstruct
public void initialize()
{
- initIncludes();
- configuration.addChangeListener( this );
}
public RepositorySessionFactory getRepositorySessionFactory( )
diff --git a/status-dep.txt b/status-dep.txt
index edcd464e3..a43ca99f6 100644
--- a/status-dep.txt
+++ b/status-dep.txt
@@ -54,6 +54,7 @@ archiva-modules
stage-repository-merge
metadata-store-file
audit
+ problem-reports