Dependency cleanup of problem-reports

This commit is contained in:
Martin Stockhammer 2020-06-20 19:22:22 +02:00
parent 034c1429e2
commit a2637688e3
3 changed files with 39 additions and 48 deletions

View File

@ -41,21 +41,51 @@
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-configuration</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-repository-admin-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-checksum</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-model</artifactId>
<artifactId>archiva-consumer-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-consumer-api</artifactId>
<artifactId>archiva-repository-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>metadata-model</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<!-- Test scope -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
@ -84,17 +114,6 @@
<artifactId>archiva-repository-layer</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.archiva.components.cache</groupId>
<artifactId>archiva-components-spring-cache-ehcache</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>

View File

@ -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<String> 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( )

View File

@ -54,6 +54,7 @@ archiva-modules
stage-repository-merge
metadata-store-file
audit
problem-reports