From 42376e8fbf5e26d3c5ec75bb668230c9e56b070a Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Fri, 30 Mar 2018 13:41:05 +0200 Subject: [PATCH] Removing unused dependencies --- .../core/repository/AbstractRepositoryPurgeTest.java | 2 -- .../consumers/lucene/NexusIndexerConsumer.java | 6 +----- .../src/main/resources/META-INF/spring-context.xml | 5 ----- .../consumers/lucene/NexusIndexerConsumerTest.java | 12 ++++++------ .../indexer/merger/TemporaryGroupIndexCleaner.java | 10 ++-------- 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java index d02e99e86..27173cf9a 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java @@ -32,8 +32,6 @@ import org.apache.archiva.repository.features.ArtifactCleanupFeature; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; -import org.apache.maven.index.NexusIndexer; -import org.apache.maven.index.context.IndexingContext; import org.easymock.EasyMock; import org.easymock.IMocksControl; import org.junit.After; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java index 6cadd2730..efd5e7e8f 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java @@ -19,7 +19,6 @@ package org.apache.archiva.consumers.lucene; * under the License. */ -import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.common.utils.PathUtil; import org.apache.archiva.configuration.ArchivaConfiguration; @@ -80,8 +79,6 @@ public class NexusIndexerConsumer private IndexingContext indexingContext; - private NexusIndexer nexusIndexer; - private List includes = new ArrayList<>( 0 ); private ManagedRepository repository; @@ -94,12 +91,11 @@ public class NexusIndexerConsumer public NexusIndexerConsumer( @Named( value = "archivaTaskScheduler#indexing" ) ArchivaTaskScheduler scheduler, @Named( value = "archivaConfiguration" ) ArchivaConfiguration configuration, FileTypes filetypes, - List indexCreators, ManagedRepositoryAdmin managedRepositoryAdmin, NexusIndexer nexusIndexer ) + List indexCreators, ManagedRepositoryAdmin managedRepositoryAdmin) { this.configuration = configuration; this.filetypes = filetypes; this.scheduler = scheduler; - this.nexusIndexer = nexusIndexer; this.allIndexCreators = indexCreators; this.managedRepositoryAdmin = managedRepositoryAdmin; } diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/resources/META-INF/spring-context.xml index a93c21a43..0609595ac 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/resources/META-INF/spring-context.xml @@ -32,9 +32,4 @@ - - - org.apache.maven.index.DefaultNexusIndexer - - \ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java index 2efebfb78..d0fcada2f 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java @@ -31,7 +31,6 @@ import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.scheduler.ArchivaTaskScheduler; import org.apache.archiva.scheduler.indexing.ArtifactIndexingTask; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; -import org.apache.maven.index.NexusIndexer; import org.apache.maven.index.context.IndexCreator; import org.junit.After; import org.junit.Before; @@ -46,7 +45,11 @@ import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; +import java.util.Calendar; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Set; /** * NexusIndexerConsumerTest @@ -96,9 +99,6 @@ public class NexusIndexerConsumerTest @Inject private ApplicationContext applicationContext; - @Inject - private NexusIndexer nexusIndexer; - @Inject private List indexCreators; @@ -124,7 +124,7 @@ public class NexusIndexerConsumerTest nexusIndexerConsumer = new NexusIndexerConsumer( scheduler, configuration, filetypes, indexCreators, - managedRepositoryAdmin, nexusIndexer ); + managedRepositoryAdmin); // initialize to set the file types to be processed nexusIndexerConsumer.initialize(); diff --git a/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java b/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java index dc7f5c03a..583ddd2c8 100644 --- a/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java +++ b/archiva-modules/archiva-base/archiva-maven2-indexer/src/main/java/org/apache/archiva/indexer/merger/TemporaryGroupIndexCleaner.java @@ -18,9 +18,6 @@ package org.apache.archiva.indexer.merger; * under the License. */ -import org.apache.archiva.common.plexusbridge.PlexusSisuBridge; -import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException; -import org.apache.maven.index.NexusIndexer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.Scheduled; @@ -41,13 +38,10 @@ public class TemporaryGroupIndexCleaner @Inject private IndexMerger indexMerger; - private NexusIndexer indexer; - @Inject - public TemporaryGroupIndexCleaner( NexusIndexer nexusIndexer ) - throws PlexusSisuBridgeException + public TemporaryGroupIndexCleaner( ) { - this.indexer = nexusIndexer; + } // 900000 -- 2.39.5