import org.apache.archiva.admin.model.RepositoryAdminException;
import org.apache.archiva.admin.model.beans.ManagedRepository;
import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin;
-import org.apache.archiva.common.plexusbridge.MavenIndexerUtils;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.index.MAVEN;
import org.apache.maven.index.NexusIndexer;
import org.apache.maven.index.artifact.IllegalArtifactCoordinateException;
-import org.apache.maven.index.context.IndexCreator;
import org.apache.maven.index.context.IndexingContext;
import org.apache.maven.index.expr.SourcedSearchExpression;
import org.apache.maven.index.packer.IndexPacker;
import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
-import java.util.List;
/**
* ArchivaIndexingTaskExecutor Executes all indexing tasks. Adding, updating and removing artifacts from the index are
@Inject
private PlexusSisuBridge plexusSisuBridge;
- @Inject
- private MavenIndexerUtils mavenIndexerUtils;
-
@Inject
private ManagedRepositoryAdmin managedRepositoryAdmin;
private NexusIndexer nexusIndexer;
- private List<? extends IndexCreator> allIndexCreators;
-
@PostConstruct
public void initialize()
throws PlexusSisuBridgeException
nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
- allIndexCreators = mavenIndexerUtils.getAllIndexCreators();
}
public void executeTask( Task task )
*/
import org.apache.archiva.admin.model.beans.ManagedRepository;
-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.taskqueue.Task;
-import org.slf4j.LoggerFactory;
import java.io.File;
-import java.io.IOException;
-import java.util.List;
public class ArtifactIndexingTask
implements Task