aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-08-15 22:17:08 +0000
committerOlivier Lamy <olamy@apache.org>2011-08-15 22:17:08 +0000
commit1776b31a4b47e2a9a8b7d83425de2c786d35e52c (patch)
treea99d4e33eff3cb604e4407514e07abb06f226300 /archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src
parent7a354f09edd42e88033f36cc75394e7e11549900 (diff)
downloadarchiva-1776b31a4b47e2a9a8b7d83425de2c786d35e52c.tar.gz
archiva-1776b31a4b47e2a9a8b7d83425de2c786d35e52c.zip
cleanup creation of IndexCreator with using the container rather than using default constructors
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1158035 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java6
1 files changed, 5 insertions, 1 deletions
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 075a16289..ccdb2c493 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
@@ -38,6 +38,7 @@ 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.index.NexusIndexer;
+import org.apache.maven.index.context.IndexCreator;
import org.apache.maven.index.context.IndexingContext;
import org.apache.maven.index.context.UnsupportedExistingLuceneIndexException;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
@@ -73,6 +74,8 @@ public class NexusIndexerConsumer
private ManagedRepositoryConfiguration repository;
+ private List<IndexCreator> allIndexCreators;
+
public NexusIndexerConsumer( ArchivaTaskScheduler<ArtifactIndexingTask> scheduler,
ArchivaConfiguration configuration, FileTypes filetypes, PlexusSisuBridge plexusSisuBridge )
throws PlexusSisuBridgeException
@@ -81,6 +84,7 @@ public class NexusIndexerConsumer
this.filetypes = filetypes;
this.scheduler = scheduler;
this.nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
+ this.allIndexCreators = plexusSisuBridge.lookupList( IndexCreator.class );
}
public String getDescription()
@@ -107,7 +111,7 @@ public class NexusIndexerConsumer
try
{
log.info( "Creating indexing context for repo : " + repository.getId() );
- context = ArtifactIndexingTask.createContext( repository, nexusIndexer );
+ context = ArtifactIndexingTask.createContext( repository, nexusIndexer, allIndexCreators );
}
catch ( IOException e )
{