Search in sources :

Example 1 with DefaultScannerListener

use of org.apache.maven.index.DefaultScannerListener in project archiva by apache.

the class ArchivaIndexManagerMock method scan.

@Override
public void scan(final ArchivaIndexingContext context) throws IndexUpdateFailedException {
    executeUpdateFunction(context, indexingContext -> {
        DefaultScannerListener listener = new DefaultScannerListener(indexingContext, indexerEngine, true, null);
        ScanningRequest request = new ScanningRequest(indexingContext, listener);
        ScanningResult result = scanner.scan(request);
        if (result.hasExceptions()) {
            log.error("Exceptions occured during index scan of " + context.getId());
            result.getExceptions().stream().map(e -> e.getMessage()).distinct().limit(5).forEach(s -> log.error("Message: " + s));
        }
    });
}
Also used : ScanningResult(org.apache.maven.index.ScanningResult) AuthenticationException(org.apache.maven.wagon.authentication.AuthenticationException) ArtifactContext(org.apache.maven.index.ArtifactContext) StringUtils(org.apache.commons.lang.StringUtils) PathUtil(org.apache.archiva.common.utils.PathUtil) UnsupportedBaseContextException(org.apache.archiva.indexer.UnsupportedBaseContextException) LoggerFactory(org.slf4j.LoggerFactory) IndexCreator(org.apache.maven.index.context.IndexCreator) ArchivaIndexManager(org.apache.archiva.indexer.ArchivaIndexManager) ArchivaConfiguration(org.apache.archiva.configuration.ArchivaConfiguration) WagonFactoryException(org.apache.archiva.proxy.common.WagonFactoryException) NetworkProxyAdmin(org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin) PasswordCredentials(org.apache.archiva.repository.PasswordCredentials) Map(java.util.Map) FileUtils(org.apache.archiva.common.utils.FileUtils) IndexCreationFailedException(org.apache.archiva.indexer.IndexCreationFailedException) UnsupportedRepositoryTypeException(org.apache.archiva.repository.UnsupportedRepositoryTypeException) RemoteIndexFeature(org.apache.archiva.repository.features.RemoteIndexFeature) URI(java.net.URI) TransferFailedException(org.apache.maven.wagon.TransferFailedException) Path(java.nio.file.Path) ArchivaIndexingContext(org.apache.archiva.indexer.ArchivaIndexingContext) AbstractHttpClientWagon(org.apache.maven.wagon.shared.http.AbstractHttpClientWagon) TransferEvent(org.apache.maven.wagon.events.TransferEvent) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) IndexCreationFeature(org.apache.archiva.repository.features.IndexCreationFeature) HttpMethodConfiguration(org.apache.maven.wagon.shared.http.HttpMethodConfiguration) ProxyInfo(org.apache.maven.wagon.proxy.ProxyInfo) Collection(java.util.Collection) ConnectionException(org.apache.maven.wagon.ConnectionException) AuthorizationException(org.apache.maven.wagon.authorization.AuthorizationException) Collectors(java.util.stream.Collectors) Indexer(org.apache.maven.index.Indexer) FileNotFoundException(java.io.FileNotFoundException) ManagedRepository(org.apache.archiva.repository.ManagedRepository) IndexUpdateRequest(org.apache.maven.index.updater.IndexUpdateRequest) IndexUpdateFailedException(org.apache.archiva.indexer.IndexUpdateFailedException) List(java.util.List) HttpConfiguration(org.apache.maven.wagon.shared.http.HttpConfiguration) IndexFormatTooOldException(org.apache.maven.index_shaded.lucene.index.IndexFormatTooOldException) IndexerEngine(org.apache.maven.index.IndexerEngine) EditableRepository(org.apache.archiva.repository.EditableRepository) WagonFactoryRequest(org.apache.archiva.proxy.common.WagonFactoryRequest) Scanner(org.apache.maven.index.Scanner) NetworkProxy(org.apache.archiva.admin.model.beans.NetworkProxy) ArtifactContextProducer(org.apache.maven.index.ArtifactContextProducer) WagonFactory(org.apache.archiva.proxy.common.WagonFactory) Inject(javax.inject.Inject) Repository(org.apache.archiva.repository.Repository) RemoteRepository(org.apache.archiva.repository.RemoteRepository) Service(org.springframework.stereotype.Service) IndexPackingRequest(org.apache.maven.index.packer.IndexPackingRequest) ResourceFetcher(org.apache.maven.index.updater.ResourceFetcher) StreamWagon(org.apache.maven.wagon.StreamWagon) Logger(org.slf4j.Logger) IndexPacker(org.apache.maven.index.packer.IndexPacker) MalformedURLException(java.net.MalformedURLException) Files(java.nio.file.Files) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener) ScanningRequest(org.apache.maven.index.ScanningRequest) AuthenticationInfo(org.apache.maven.wagon.authentication.AuthenticationInfo) IOException(java.io.IOException) RepositoryType(org.apache.archiva.repository.RepositoryType) IndexingContext(org.apache.maven.index.context.IndexingContext) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) ResourceDoesNotExistException(org.apache.maven.wagon.ResourceDoesNotExistException) Paths(java.nio.file.Paths) TransferListener(org.apache.maven.wagon.events.TransferListener) Wagon(org.apache.maven.wagon.Wagon) ScanningResult(org.apache.maven.index.ScanningResult) InputStream(java.io.InputStream) ScanningRequest(org.apache.maven.index.ScanningRequest) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener)

Example 2 with DefaultScannerListener

use of org.apache.maven.index.DefaultScannerListener in project archiva by apache.

the class AbstractMavenRepositorySearch method createIndex.

protected void createIndex(String repository, List<Path> filesToBeIndexed, boolean scan, Path indexDir) throws Exception {
    Repository rRepo = repositoryRegistry.getRepository(repository);
    IndexCreationFeature icf = rRepo.getFeature(IndexCreationFeature.class).get();
    IndexingContext context = rRepo.getIndexingContext().getBaseContext(IndexingContext.class);
    if (context != null) {
        context.close(true);
    }
    Path repoDir = Paths.get(org.apache.archiva.common.utils.FileUtils.getBasedir()).resolve("target").resolve("repos").resolve(repository);
    Path indexerDirectory = repoDir.resolve(".indexer");
    if (Files.exists(indexerDirectory)) {
        FileUtils.deleteDirectory(indexerDirectory);
    }
    assertFalse(Files.exists(indexerDirectory));
    Path lockFile = repoDir.resolve(".indexer/write.lock");
    if (Files.exists(lockFile)) {
        Files.delete(lockFile);
    }
    assertFalse(Files.exists(lockFile));
    Path repo = Paths.get(org.apache.archiva.common.utils.FileUtils.getBasedir(), "src/test/" + repository);
    assertTrue(Files.exists(repo));
    org.apache.commons.io.FileUtils.copyDirectory(repo.toFile(), repoDir.toFile());
    if (indexDir == null) {
        Path indexDirectory = Paths.get(org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/index/test-" + Long.toString(System.currentTimeMillis()));
        indexDirectory.toFile().deleteOnExit();
        FileUtils.deleteDirectory(indexDirectory);
        icf.setIndexPath(indexDirectory.toUri());
    } else {
        icf.setIndexPath(indexDir.toUri());
    }
    context = rRepo.getIndexingContext().getBaseContext(IndexingContext.class);
    // context.getIndexWriter().setRAMBufferSizeMB( 1 );
    for (Path artifactFile : filesToBeIndexed) {
        assertTrue("file not exists " + artifactFile, Files.exists(artifactFile));
        ArtifactContext ac = artifactContextProducer.getArtifactContext(context, artifactFile.toFile());
        if (artifactFile.toString().endsWith(".pom")) {
            ac.getArtifactInfo().setFileExtension("pom");
            ac.getArtifactInfo().setPackaging("pom");
            ac.getArtifactInfo().setClassifier("pom");
        }
        indexer.addArtifactToIndex(ac, context);
        context.updateTimestamp(true);
    }
    if (scan) {
        DefaultScannerListener listener = new DefaultScannerListener(context, indexerEngine, true, new ArtifactScanListener());
        ScanningRequest req = new ScanningRequest(context, listener);
        scanner.scan(req);
        context.commit();
    }
    // force flushing
    context.commit();
    // context.getIndexWriter().commit();
    context.setSearchable(true);
}
Also used : Path(java.nio.file.Path) ScanningRequest(org.apache.maven.index.ScanningRequest) Repository(org.apache.archiva.repository.Repository) IndexCreationFeature(org.apache.archiva.repository.features.IndexCreationFeature) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener) IndexingContext(org.apache.maven.index.context.IndexingContext) ArtifactContext(org.apache.maven.index.ArtifactContext)

Example 3 with DefaultScannerListener

use of org.apache.maven.index.DefaultScannerListener in project archiva by apache.

the class ArchivaIndexManagerMock method scan.

@Override
public void scan(final ArchivaIndexingContext context) throws IndexUpdateFailedException {
    executeUpdateFunction(context, indexingContext -> {
        DefaultScannerListener listener = new DefaultScannerListener(indexingContext, indexerEngine, true, null);
        ScanningRequest request = new ScanningRequest(indexingContext, listener);
        ScanningResult result = scanner.scan(request);
        if (result.hasExceptions()) {
            log.error("Exceptions occured during index scan of " + context.getId());
            result.getExceptions().stream().map(e -> e.getMessage()).distinct().limit(5).forEach(s -> log.error("Message: " + s));
        }
    });
}
Also used : ScanningResult(org.apache.maven.index.ScanningResult) AuthenticationException(org.apache.maven.wagon.authentication.AuthenticationException) ArtifactContext(org.apache.maven.index.ArtifactContext) StringUtils(org.apache.commons.lang.StringUtils) PathUtil(org.apache.archiva.common.utils.PathUtil) UnsupportedBaseContextException(org.apache.archiva.indexer.UnsupportedBaseContextException) LoggerFactory(org.slf4j.LoggerFactory) IndexCreator(org.apache.maven.index.context.IndexCreator) ArchivaIndexManager(org.apache.archiva.indexer.ArchivaIndexManager) ArchivaConfiguration(org.apache.archiva.configuration.ArchivaConfiguration) WagonFactoryException(org.apache.archiva.proxy.common.WagonFactoryException) NetworkProxyAdmin(org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin) PasswordCredentials(org.apache.archiva.repository.PasswordCredentials) Map(java.util.Map) FileUtils(org.apache.archiva.common.utils.FileUtils) IndexCreationFailedException(org.apache.archiva.indexer.IndexCreationFailedException) UnsupportedRepositoryTypeException(org.apache.archiva.repository.UnsupportedRepositoryTypeException) RemoteIndexFeature(org.apache.archiva.repository.features.RemoteIndexFeature) URI(java.net.URI) TransferFailedException(org.apache.maven.wagon.TransferFailedException) Path(java.nio.file.Path) ArchivaIndexingContext(org.apache.archiva.indexer.ArchivaIndexingContext) AbstractHttpClientWagon(org.apache.maven.wagon.shared.http.AbstractHttpClientWagon) TransferEvent(org.apache.maven.wagon.events.TransferEvent) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) IndexCreationFeature(org.apache.archiva.repository.features.IndexCreationFeature) HttpMethodConfiguration(org.apache.maven.wagon.shared.http.HttpMethodConfiguration) ProxyInfo(org.apache.maven.wagon.proxy.ProxyInfo) Collection(java.util.Collection) ConnectionException(org.apache.maven.wagon.ConnectionException) AuthorizationException(org.apache.maven.wagon.authorization.AuthorizationException) Collectors(java.util.stream.Collectors) Indexer(org.apache.maven.index.Indexer) FileNotFoundException(java.io.FileNotFoundException) ManagedRepository(org.apache.archiva.repository.ManagedRepository) IndexUpdateRequest(org.apache.maven.index.updater.IndexUpdateRequest) IndexUpdateFailedException(org.apache.archiva.indexer.IndexUpdateFailedException) List(java.util.List) HttpConfiguration(org.apache.maven.wagon.shared.http.HttpConfiguration) IndexFormatTooOldException(org.apache.maven.index_shaded.lucene.index.IndexFormatTooOldException) IndexerEngine(org.apache.maven.index.IndexerEngine) EditableRepository(org.apache.archiva.repository.EditableRepository) WagonFactoryRequest(org.apache.archiva.proxy.common.WagonFactoryRequest) Scanner(org.apache.maven.index.Scanner) NetworkProxy(org.apache.archiva.admin.model.beans.NetworkProxy) ArtifactContextProducer(org.apache.maven.index.ArtifactContextProducer) WagonFactory(org.apache.archiva.proxy.common.WagonFactory) Inject(javax.inject.Inject) Repository(org.apache.archiva.repository.Repository) RemoteRepository(org.apache.archiva.repository.RemoteRepository) Service(org.springframework.stereotype.Service) IndexPackingRequest(org.apache.maven.index.packer.IndexPackingRequest) ResourceFetcher(org.apache.maven.index.updater.ResourceFetcher) StreamWagon(org.apache.maven.wagon.StreamWagon) Logger(org.slf4j.Logger) IndexPacker(org.apache.maven.index.packer.IndexPacker) MalformedURLException(java.net.MalformedURLException) Files(java.nio.file.Files) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener) ScanningRequest(org.apache.maven.index.ScanningRequest) AuthenticationInfo(org.apache.maven.wagon.authentication.AuthenticationInfo) IOException(java.io.IOException) RepositoryType(org.apache.archiva.repository.RepositoryType) IndexingContext(org.apache.maven.index.context.IndexingContext) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) ResourceDoesNotExistException(org.apache.maven.wagon.ResourceDoesNotExistException) Paths(java.nio.file.Paths) TransferListener(org.apache.maven.wagon.events.TransferListener) Wagon(org.apache.maven.wagon.Wagon) ScanningResult(org.apache.maven.index.ScanningResult) InputStream(java.io.InputStream) ScanningRequest(org.apache.maven.index.ScanningRequest) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener)

Example 4 with DefaultScannerListener

use of org.apache.maven.index.DefaultScannerListener in project archiva by apache.

the class ArchivaIndexingTaskExecutor method executeTask.

/**
 * depending on current {@link Task} you have.
 * If {@link org.apache.archiva.scheduler.indexing.ArtifactIndexingTask.Action#FINISH} &amp;&amp; isExecuteOnEntireRepo:
 * repository will be scanned.
 *
 * @param task
 * @throws TaskExecutionException
 */
@Override
public void executeTask(Task task) throws TaskExecutionException {
    ArtifactIndexingTask indexingTask = (ArtifactIndexingTask) task;
    ManagedRepository repository = indexingTask.getRepository();
    ArchivaIndexingContext archivaContext = indexingTask.getContext();
    IndexingContext context = null;
    try {
        context = archivaContext.getBaseContext(IndexingContext.class);
    } catch (UnsupportedBaseContextException e) {
        throw new TaskExecutionException("Bad repository type.", e);
    }
    if (ArtifactIndexingTask.Action.FINISH.equals(indexingTask.getAction()) && indexingTask.isExecuteOnEntireRepo()) {
        long start = System.currentTimeMillis();
        try {
            context.updateTimestamp();
            DefaultScannerListener listener = new DefaultScannerListener(context, indexerEngine, true, null);
            ScanningRequest request = new ScanningRequest(context, listener);
            ScanningResult result = scanner.scan(request);
            if (result.hasExceptions()) {
                log.error("Exceptions occured during index scan of " + context.getId());
                result.getExceptions().stream().map(e -> e.getMessage()).distinct().limit(5).forEach(s -> log.error("Message: " + s));
            }
        } catch (IOException e) {
            log.error("Error during context scan {}: {}", context.getId(), context.getIndexDirectory());
        }
        long end = System.currentTimeMillis();
        log.info("indexed maven repository: {}, onlyUpdate: {}, time {} ms", repository.getId(), indexingTask.isOnlyUpdate(), (end - start));
        log.debug("Finishing indexing task on repo: {}", repository.getId());
        finishIndexingTask(indexingTask, repository, context);
    } else {
        // create context if not a repo scan request
        if (!indexingTask.isExecuteOnEntireRepo()) {
            try {
                // 
                log.debug(// 
                "Creating indexing context on resource: {}", (indexingTask.getResourceFile() == null ? "none" : indexingTask.getResourceFile()));
                archivaContext = repository.getIndexingContext();
                context = archivaContext.getBaseContext(IndexingContext.class);
            } catch (UnsupportedBaseContextException e) {
                log.error("Error occurred while creating context: {}", e.getMessage());
                throw new TaskExecutionException("Error occurred while creating context: " + e.getMessage(), e);
            }
        }
        if (context == null || context.getIndexDirectory() == null) {
            throw new TaskExecutionException("Trying to index an artifact but the context is already closed");
        }
        try {
            Path artifactFile = indexingTask.getResourceFile();
            if (artifactFile == null) {
                log.debug("no artifact pass in indexing task so skip it");
            } else {
                ArtifactContext ac = artifactContextProducer.getArtifactContext(context, artifactFile.toFile());
                if (ac != null) {
                    // TODO make that configurable?
                    if (artifactFile.getFileName().toString().endsWith(".pom")) {
                        ac.getArtifactInfo().setFileExtension("pom");
                        ac.getArtifactInfo().setPackaging("pom");
                        ac.getArtifactInfo().setClassifier("pom");
                    }
                    if (indexingTask.getAction().equals(ArtifactIndexingTask.Action.ADD)) {
                        // IndexSearcher s = context.getIndexSearcher();
                        // String uinfo = ac.getArtifactInfo().getUinfo();
                        // TopDocs d = s.search( new TermQuery( new Term( ArtifactInfo.UINFO, uinfo ) ), 1 );
                        BooleanQuery.Builder qb = new BooleanQuery.Builder();
                        qb.add(indexer.constructQuery(MAVEN.GROUP_ID, new SourcedSearchExpression(ac.getArtifactInfo().getGroupId())), BooleanClause.Occur.MUST);
                        qb.add(indexer.constructQuery(MAVEN.ARTIFACT_ID, new SourcedSearchExpression(ac.getArtifactInfo().getArtifactId())), BooleanClause.Occur.MUST);
                        qb.add(indexer.constructQuery(MAVEN.VERSION, new SourcedSearchExpression(ac.getArtifactInfo().getVersion())), BooleanClause.Occur.MUST);
                        if (ac.getArtifactInfo().getClassifier() != null) {
                            qb.add(indexer.constructQuery(MAVEN.CLASSIFIER, new SourcedSearchExpression(ac.getArtifactInfo().getClassifier())), BooleanClause.Occur.MUST);
                        }
                        if (ac.getArtifactInfo().getPackaging() != null) {
                            qb.add(indexer.constructQuery(MAVEN.PACKAGING, new SourcedSearchExpression(ac.getArtifactInfo().getPackaging())), BooleanClause.Occur.MUST);
                        }
                        FlatSearchRequest flatSearchRequest = new FlatSearchRequest(qb.build(), context);
                        FlatSearchResponse flatSearchResponse = indexer.searchFlat(flatSearchRequest);
                        if (flatSearchResponse.getResults().isEmpty()) {
                            log.debug("Adding artifact '{}' to index..", ac.getArtifactInfo());
                            indexerEngine.index(context, ac);
                        } else {
                            log.debug("Updating artifact '{}' in index..", ac.getArtifactInfo());
                            // TODO check if update exists !!
                            indexerEngine.update(context, ac);
                        }
                        context.updateTimestamp();
                        context.commit();
                    } else {
                        log.debug("Removing artifact '{}' from index..", ac.getArtifactInfo());
                        indexerEngine.remove(context, ac);
                    }
                }
            }
            // close the context if not a repo scan request
            if (!indexingTask.isExecuteOnEntireRepo()) {
                log.debug("Finishing indexing task on resource file : {}", indexingTask.getResourceFile() != null ? indexingTask.getResourceFile() : " none ");
                finishIndexingTask(indexingTask, repository, context);
            }
        } catch (IOException e) {
            log.error("Error occurred while executing indexing task '{}': {}", indexingTask, e.getMessage(), e);
            throw new TaskExecutionException("Error occurred while executing indexing task '" + indexingTask + "'", e);
        }
    }
}
Also used : ArtifactContext(org.apache.maven.index.ArtifactContext) UnsupportedBaseContextException(org.apache.archiva.indexer.UnsupportedBaseContextException) Task(org.apache.archiva.redback.components.taskqueue.Task) ArtifactContextProducer(org.apache.maven.index.ArtifactContextProducer) LoggerFactory(org.slf4j.LoggerFactory) Inject(javax.inject.Inject) FlatSearchResponse(org.apache.maven.index.FlatSearchResponse) Service(org.springframework.stereotype.Service) MAVEN(org.apache.maven.index.MAVEN) IndexPackingRequest(org.apache.maven.index.packer.IndexPackingRequest) TaskExecutionException(org.apache.archiva.redback.components.taskqueue.execution.TaskExecutionException) Path(java.nio.file.Path) ArchivaIndexingContext(org.apache.archiva.indexer.ArchivaIndexingContext) Logger(org.slf4j.Logger) IndexCreationFeature(org.apache.archiva.repository.features.IndexCreationFeature) IndexPacker(org.apache.maven.index.packer.IndexPacker) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener) ScanningRequest(org.apache.maven.index.ScanningRequest) BooleanClause(org.apache.maven.index_shaded.lucene.search.BooleanClause) BooleanQuery(org.apache.maven.index_shaded.lucene.search.BooleanQuery) IOException(java.io.IOException) SourcedSearchExpression(org.apache.maven.index.expr.SourcedSearchExpression) Indexer(org.apache.maven.index.Indexer) ManagedRepository(org.apache.archiva.repository.ManagedRepository) TaskExecutor(org.apache.archiva.redback.components.taskqueue.execution.TaskExecutor) IndexingContext(org.apache.maven.index.context.IndexingContext) FlatSearchRequest(org.apache.maven.index.FlatSearchRequest) IndexerEngine(org.apache.maven.index.IndexerEngine) Scanner(org.apache.maven.index.Scanner) ScanningResult(org.apache.maven.index.ScanningResult) Path(java.nio.file.Path) BooleanQuery(org.apache.maven.index_shaded.lucene.search.BooleanQuery) ManagedRepository(org.apache.archiva.repository.ManagedRepository) FlatSearchResponse(org.apache.maven.index.FlatSearchResponse) ArtifactContext(org.apache.maven.index.ArtifactContext) IOException(java.io.IOException) FlatSearchRequest(org.apache.maven.index.FlatSearchRequest) ArchivaIndexingContext(org.apache.archiva.indexer.ArchivaIndexingContext) TaskExecutionException(org.apache.archiva.redback.components.taskqueue.execution.TaskExecutionException) ScanningResult(org.apache.maven.index.ScanningResult) UnsupportedBaseContextException(org.apache.archiva.indexer.UnsupportedBaseContextException) ScanningRequest(org.apache.maven.index.ScanningRequest) SourcedSearchExpression(org.apache.maven.index.expr.SourcedSearchExpression) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener) ArchivaIndexingContext(org.apache.archiva.indexer.ArchivaIndexingContext) IndexingContext(org.apache.maven.index.context.IndexingContext)

Example 5 with DefaultScannerListener

use of org.apache.maven.index.DefaultScannerListener in project archiva by apache.

the class MavenIndexManager method scan.

@Override
public void scan(final ArchivaIndexingContext context) throws IndexUpdateFailedException {
    executeUpdateFunction(context, indexingContext -> {
        DefaultScannerListener listener = new DefaultScannerListener(indexingContext, indexerEngine, true, null);
        ScanningRequest request = new ScanningRequest(indexingContext, listener);
        ScanningResult result = scanner.scan(request);
        if (result.hasExceptions()) {
            log.error("Exceptions occured during index scan of " + context.getId());
            result.getExceptions().stream().map(e -> e.getMessage()).distinct().limit(5).forEach(s -> log.error("Message: " + s));
        }
    });
}
Also used : ScanningResult(org.apache.maven.index.ScanningResult) AuthenticationException(org.apache.maven.wagon.authentication.AuthenticationException) ArtifactContext(org.apache.maven.index.ArtifactContext) StringUtils(org.apache.commons.lang.StringUtils) PathUtil(org.apache.archiva.common.utils.PathUtil) UnsupportedBaseContextException(org.apache.archiva.indexer.UnsupportedBaseContextException) LoggerFactory(org.slf4j.LoggerFactory) IndexCreator(org.apache.maven.index.context.IndexCreator) ArchivaIndexManager(org.apache.archiva.indexer.ArchivaIndexManager) ArchivaConfiguration(org.apache.archiva.configuration.ArchivaConfiguration) WagonFactoryException(org.apache.archiva.proxy.common.WagonFactoryException) NetworkProxyAdmin(org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin) PasswordCredentials(org.apache.archiva.repository.PasswordCredentials) Map(java.util.Map) FileUtils(org.apache.archiva.common.utils.FileUtils) IndexCreationFailedException(org.apache.archiva.indexer.IndexCreationFailedException) UnsupportedRepositoryTypeException(org.apache.archiva.repository.UnsupportedRepositoryTypeException) RemoteIndexFeature(org.apache.archiva.repository.features.RemoteIndexFeature) URI(java.net.URI) TransferFailedException(org.apache.maven.wagon.TransferFailedException) Path(java.nio.file.Path) ArchivaIndexingContext(org.apache.archiva.indexer.ArchivaIndexingContext) AbstractHttpClientWagon(org.apache.maven.wagon.shared.http.AbstractHttpClientWagon) TransferEvent(org.apache.maven.wagon.events.TransferEvent) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) IndexCreationFeature(org.apache.archiva.repository.features.IndexCreationFeature) HttpMethodConfiguration(org.apache.maven.wagon.shared.http.HttpMethodConfiguration) ProxyInfo(org.apache.maven.wagon.proxy.ProxyInfo) Collection(java.util.Collection) ConnectionException(org.apache.maven.wagon.ConnectionException) AuthorizationException(org.apache.maven.wagon.authorization.AuthorizationException) Collectors(java.util.stream.Collectors) Indexer(org.apache.maven.index.Indexer) FileNotFoundException(java.io.FileNotFoundException) ManagedRepository(org.apache.archiva.repository.ManagedRepository) IndexUpdateRequest(org.apache.maven.index.updater.IndexUpdateRequest) IndexUpdateFailedException(org.apache.archiva.indexer.IndexUpdateFailedException) List(java.util.List) HttpConfiguration(org.apache.maven.wagon.shared.http.HttpConfiguration) IndexFormatTooOldException(org.apache.maven.index_shaded.lucene.index.IndexFormatTooOldException) IndexerEngine(org.apache.maven.index.IndexerEngine) EditableRepository(org.apache.archiva.repository.EditableRepository) WagonFactoryRequest(org.apache.archiva.proxy.common.WagonFactoryRequest) Scanner(org.apache.maven.index.Scanner) NetworkProxy(org.apache.archiva.admin.model.beans.NetworkProxy) ArtifactContextProducer(org.apache.maven.index.ArtifactContextProducer) WagonFactory(org.apache.archiva.proxy.common.WagonFactory) IndexUpdater(org.apache.maven.index.updater.IndexUpdater) Inject(javax.inject.Inject) Repository(org.apache.archiva.repository.Repository) RemoteRepository(org.apache.archiva.repository.RemoteRepository) Service(org.springframework.stereotype.Service) IndexPackingRequest(org.apache.maven.index.packer.IndexPackingRequest) ResourceFetcher(org.apache.maven.index.updater.ResourceFetcher) StreamWagon(org.apache.maven.wagon.StreamWagon) Logger(org.slf4j.Logger) IndexPacker(org.apache.maven.index.packer.IndexPacker) MalformedURLException(java.net.MalformedURLException) Files(java.nio.file.Files) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener) ScanningRequest(org.apache.maven.index.ScanningRequest) AuthenticationInfo(org.apache.maven.wagon.authentication.AuthenticationInfo) IOException(java.io.IOException) RepositoryType(org.apache.archiva.repository.RepositoryType) IndexingContext(org.apache.maven.index.context.IndexingContext) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) ResourceDoesNotExistException(org.apache.maven.wagon.ResourceDoesNotExistException) Paths(java.nio.file.Paths) TransferListener(org.apache.maven.wagon.events.TransferListener) Wagon(org.apache.maven.wagon.Wagon) ScanningResult(org.apache.maven.index.ScanningResult) InputStream(java.io.InputStream) ScanningRequest(org.apache.maven.index.ScanningRequest) DefaultScannerListener(org.apache.maven.index.DefaultScannerListener)

Aggregations

Path (java.nio.file.Path)5 IndexCreationFeature (org.apache.archiva.repository.features.IndexCreationFeature)5 ArtifactContext (org.apache.maven.index.ArtifactContext)5 IOException (java.io.IOException)4 Inject (javax.inject.Inject)4 ArchivaIndexingContext (org.apache.archiva.indexer.ArchivaIndexingContext)4 UnsupportedBaseContextException (org.apache.archiva.indexer.UnsupportedBaseContextException)4 ManagedRepository (org.apache.archiva.repository.ManagedRepository)4 Repository (org.apache.archiva.repository.Repository)4 ArtifactContextProducer (org.apache.maven.index.ArtifactContextProducer)4 DefaultScannerListener (org.apache.maven.index.DefaultScannerListener)4 ScanningRequest (org.apache.maven.index.ScanningRequest)4 IndexingContext (org.apache.maven.index.context.IndexingContext)4 FileNotFoundException (java.io.FileNotFoundException)3 InputStream (java.io.InputStream)3 MalformedURLException (java.net.MalformedURLException)3 URI (java.net.URI)3 Files (java.nio.file.Files)3 Paths (java.nio.file.Paths)3 Collection (java.util.Collection)3