From 830fa7a4a38b5558b402e08d1b2979dd09ff241a Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Wed, 9 Dec 2009 02:07:46 +0000 Subject: [PATCH] [MRM-1025] remove unused dependencies git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@888675 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-lucene-consumers/pom.xml | 4 ---- .../consumers/lucene/NexusIndexerConsumer.java | 15 +++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml index 3d0d77f22..928534dfc 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml @@ -38,10 +38,6 @@ org.apache.archiva archiva-consumer-api - - org.apache.archiva - archiva-repository-layer - org.apache.archiva archiva-scheduler-api 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 be141b307..836fa6a8e 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 @@ -35,7 +35,6 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer; import org.apache.maven.archiva.consumers.ConsumerException; import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer; -import org.apache.maven.archiva.repository.content.ManagedDefaultRepositoryContent; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; import org.codehaus.plexus.registry.Registry; @@ -59,8 +58,6 @@ public class NexusIndexerConsumer private FileTypes filetypes; - private ManagedDefaultRepositoryContent repositoryContent; - private File managedRepository; private ArchivaTaskScheduler scheduler; @@ -69,6 +66,8 @@ public class NexusIndexerConsumer private List includes = new ArrayList(); + private ManagedRepositoryConfiguration repository; + public NexusIndexerConsumer( ArchivaTaskScheduler scheduler, ArchivaConfiguration configuration, FileTypes filetypes ) { @@ -95,11 +94,9 @@ public class NexusIndexerConsumer public void beginScan( ManagedRepositoryConfiguration repository, Date whenGathered ) throws ConsumerException { + this.repository = repository; managedRepository = new File( repository.getLocation() ); - repositoryContent = new ManagedDefaultRepositoryContent(); - repositoryContent.setRepository( repository ); - try { context = ArtifactIndexingTask.createContext( repository ); @@ -120,8 +117,7 @@ public class NexusIndexerConsumer File artifactFile = new File( managedRepository, path ); ArtifactIndexingTask task = - new ArtifactIndexingTask( repositoryContent.getRepository(), artifactFile, ArtifactIndexingTask.Action.ADD, - context ); + new ArtifactIndexingTask( repository, artifactFile, ArtifactIndexingTask.Action.ADD, context ); try { log.debug( "Queueing indexing task + '" + task + "' to add or update the artifact in the index." ); @@ -136,8 +132,7 @@ public class NexusIndexerConsumer public void completeScan() { ArtifactIndexingTask task = - new ArtifactIndexingTask( repositoryContent.getRepository(), null, ArtifactIndexingTask.Action.FINISH, - context ); + new ArtifactIndexingTask( repository, null, ArtifactIndexingTask.Action.FINISH, context ); try { log.debug( "Queueing indexing task + '" + task + "' to finish indexing." ); -- 2.39.5