Search in sources :

Example 21 with IndexingContext

use of org.apache.maven.index.context.IndexingContext 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} && 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 22 with IndexingContext

use of org.apache.maven.index.context.IndexingContext in project archiva by apache.

the class DefaultDownloadRemoteIndexScheduler method startup.

@PostConstruct
public void startup() throws DownloadRemoteIndexException, UnsupportedBaseContextException {
    archivaConfiguration.addListener(this);
    for (org.apache.archiva.repository.RemoteRepository remoteRepository : repositoryRegistry.getRemoteRepositories()) {
        String contextKey = "remote-" + remoteRepository.getId();
        IndexingContext context = remoteRepository.getIndexingContext().getBaseContext(IndexingContext.class);
        if (context == null) {
            continue;
        }
        RemoteIndexFeature rif = remoteRepository.getFeature(RemoteIndexFeature.class).get();
        // TODO record jobs from configuration
        if (rif.isDownloadRemoteIndex() && StringUtils.isNotEmpty(remoteRepository.getSchedulingDefinition())) {
            boolean fullDownload = context.getIndexDirectoryFile().list().length == 0;
            scheduleDownloadRemote(remoteRepository.getId(), false, fullDownload);
        }
    }
}
Also used : IndexingContext(org.apache.maven.index.context.IndexingContext) RemoteIndexFeature(org.apache.archiva.repository.features.RemoteIndexFeature) PostConstruct(javax.annotation.PostConstruct)

Example 23 with IndexingContext

use of org.apache.maven.index.context.IndexingContext in project archiva by apache.

the class NexusIndexerConsumer method beginScan.

@Override
public void beginScan(ManagedRepository repository, Date whenGathered) throws ConsumerException {
    this.repository = repository;
    managedRepository = PathUtil.getPathFromUri(repository.getLocation());
    try {
        log.info("Creating indexing context for repo : {}", repository.getId());
        if (repository.getType() == RepositoryType.MAVEN) {
            indexingContext = repository.getIndexingContext().getBaseContext(IndexingContext.class);
        } else {
            indexingContext = null;
        }
    } catch (UnsupportedBaseContextException e) {
        log.error("Bad repository type. Not nexus indexer compatible.");
        throw new ConsumerException("Bad repository type " + repository.getType());
    }
}
Also used : UnsupportedBaseContextException(org.apache.archiva.indexer.UnsupportedBaseContextException) IndexingContext(org.apache.maven.index.context.IndexingContext) ConsumerException(org.apache.archiva.consumers.ConsumerException)

Example 24 with IndexingContext

use of org.apache.maven.index.context.IndexingContext in project archiva by apache.

the class ArchivaDavResourceFactory method buildMergedIndexDirectory.

protected Path buildMergedIndexDirectory(List<String> repositories, String activePrincipal, DavServletRequest request, RepositoryGroupConfiguration repositoryGroupConfiguration) throws DavException {
    try {
        HttpSession session = request.getSession();
        @SuppressWarnings("unchecked") Map<String, TemporaryGroupIndex> temporaryGroupIndexMap = (Map<String, TemporaryGroupIndex>) session.getAttribute(TemporaryGroupIndexSessionCleaner.TEMPORARY_INDEX_SESSION_KEY);
        if (temporaryGroupIndexMap == null) {
            temporaryGroupIndexMap = new HashMap<>();
        }
        TemporaryGroupIndex tmp = temporaryGroupIndexMap.get(repositoryGroupConfiguration.getId());
        if (tmp != null && tmp.getDirectory() != null && Files.exists(tmp.getDirectory())) {
            if (System.currentTimeMillis() - tmp.getCreationTime() > (repositoryGroupConfiguration.getMergedIndexTtl() * 60 * 1000)) {
                log.debug(MarkerFactory.getMarker("group.merged.index"), "tmp group index '{}' is too old so delete it", repositoryGroupConfiguration.getId());
                indexMerger.cleanTemporaryGroupIndex(tmp);
            } else {
                log.debug(MarkerFactory.getMarker("group.merged.index"), "merged index for group '{}' found in cache", repositoryGroupConfiguration.getId());
                return tmp.getDirectory();
            }
        }
        Set<String> authzRepos = new HashSet<String>();
        String permission = WebdavMethodUtil.getMethodPermission(request.getMethod());
        for (String repository : repositories) {
            try {
                if (servletAuth.isAuthorized(activePrincipal, repository, permission)) {
                    authzRepos.add(repository);
                    authzRepos.addAll(this.repositorySearch.getRemoteIndexingContextIds(repository));
                }
            } catch (UnauthorizedException e) {
                // TODO: review exception handling
                log.debug("Skipping repository '{}' for user '{}': {}", repository, activePrincipal, e.getMessage());
            }
        }
        log.info("generate temporary merged index for repository group '{}' for repositories '{}'", repositoryGroupConfiguration.getId(), authzRepos);
        Path tempRepoFile = Files.createTempDirectory("temp");
        tempRepoFile.toFile().deleteOnExit();
        IndexMergerRequest indexMergerRequest = new IndexMergerRequest(authzRepos, true, repositoryGroupConfiguration.getId(), repositoryGroupConfiguration.getMergedIndexPath(), repositoryGroupConfiguration.getMergedIndexTtl()).mergedIndexDirectory(tempRepoFile).temporary(true);
        MergedRemoteIndexesTaskRequest taskRequest = new MergedRemoteIndexesTaskRequest(indexMergerRequest, indexMerger);
        MergedRemoteIndexesTask job = new MergedRemoteIndexesTask(taskRequest);
        IndexingContext indexingContext = job.execute().getIndexingContext();
        Path mergedRepoDir = indexingContext.getIndexDirectoryFile().toPath();
        TemporaryGroupIndex temporaryGroupIndex = new TemporaryGroupIndex(mergedRepoDir, indexingContext.getId(), repositoryGroupConfiguration.getId(), // 
        repositoryGroupConfiguration.getMergedIndexTtl()).setCreationTime(new Date().getTime());
        temporaryGroupIndexMap.put(repositoryGroupConfiguration.getId(), temporaryGroupIndex);
        session.setAttribute(TemporaryGroupIndexSessionCleaner.TEMPORARY_INDEX_SESSION_KEY, temporaryGroupIndexMap);
        return mergedRepoDir;
    } catch (RepositorySearchException e) {
        throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e);
    } catch (IndexMergerException e) {
        throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e);
    } catch (IOException e) {
        throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e);
    }
}
Also used : Path(java.nio.file.Path) TemporaryGroupIndex(org.apache.archiva.indexer.merger.TemporaryGroupIndex) MergedRemoteIndexesTaskRequest(org.apache.archiva.indexer.merger.MergedRemoteIndexesTaskRequest) MergedRemoteIndexesTask(org.apache.archiva.indexer.merger.MergedRemoteIndexesTask) DavException(org.apache.jackrabbit.webdav.DavException) HttpSession(javax.servlet.http.HttpSession) IndexMergerRequest(org.apache.archiva.indexer.merger.IndexMergerRequest) RepositorySearchException(org.apache.archiva.indexer.search.RepositorySearchException) IOException(java.io.IOException) Date(java.util.Date) UnauthorizedException(org.apache.archiva.redback.authorization.UnauthorizedException) IndexingContext(org.apache.maven.index.context.IndexingContext) IndexMergerException(org.apache.archiva.indexer.merger.IndexMergerException) Map(java.util.Map) HashMap(java.util.HashMap) HashSet(java.util.HashSet)

Example 25 with IndexingContext

use of org.apache.maven.index.context.IndexingContext in project archiva by apache.

the class ArchivaDavResourceFactory method createResource.

@Override
public DavResource createResource(final DavResourceLocator locator, final DavServletRequest request, final DavServletResponse response) throws DavException {
    ArchivaDavResourceLocator archivaLocator = checkLocatorIsInstanceOfRepositoryLocator(locator);
    RepositoryGroupConfiguration repoGroupConfig = archivaConfiguration.getConfiguration().getRepositoryGroupsAsMap().get(archivaLocator.getRepositoryId());
    String activePrincipal = getActivePrincipal(request);
    List<String> resourcesInAbsolutePath = new ArrayList<>();
    boolean readMethod = WebdavMethodUtil.isReadMethod(request.getMethod());
    DavResource resource;
    if (repoGroupConfig != null) {
        if (!readMethod) {
            throw new DavException(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "Write method not allowed for repository groups.");
        }
        log.debug("Repository group '{}' accessed by '{}", repoGroupConfig.getId(), activePrincipal);
        // handle browse requests for virtual repos
        if (getLogicalResource(archivaLocator, null, true).endsWith("/")) {
            DavResource davResource = getResourceFromGroup(request, repoGroupConfig.getRepositories(), archivaLocator, repoGroupConfig);
            setHeaders(response, locator, davResource, true);
            return davResource;
        } else {
            // make a copy to avoid potential concurrent modifications (eg. by configuration)
            // TODO: ultimately, locking might be more efficient than copying in this fashion since updates are
            // infrequent
            List<String> repositories = new ArrayList<>(repoGroupConfig.getRepositories());
            resource = processRepositoryGroup(request, archivaLocator, repositories, activePrincipal, resourcesInAbsolutePath, repoGroupConfig);
        }
    } else {
        try {
            RemoteRepository remoteRepository = remoteRepositoryAdmin.getRemoteRepository(archivaLocator.getRepositoryId());
            if (remoteRepository != null) {
                String logicalResource = getLogicalResource(archivaLocator, null, false);
                IndexingContext indexingContext = remoteRepositoryAdmin.createIndexContext(remoteRepository);
                Path resourceFile = StringUtils.equals(logicalResource, "/") ? Paths.get(indexingContext.getIndexDirectoryFile().getParent()) : Paths.get(indexingContext.getIndexDirectoryFile().getParent(), logicalResource);
                resource = new // 
                ArchivaDavResource(// 
                resourceFile.toAbsolutePath().toString(), // 
                locator.getResourcePath(), // 
                null, // 
                request.getRemoteAddr(), // 
                activePrincipal, // 
                request.getDavSession(), // 
                archivaLocator, // 
                this, // 
                mimeTypes, // 
                auditListeners, // 
                scheduler, fileLockManager);
                setHeaders(response, locator, resource, false);
                return resource;
            }
        } catch (RepositoryAdminException e) {
            log.debug("RepositoryException remote repository with d'{}' not found, msg: {}", archivaLocator.getRepositoryId(), e.getMessage());
        }
        ManagedRepository repo = repositoryRegistry.getManagedRepository(archivaLocator.getRepositoryId());
        if (repo == null) {
            throw new DavException(HttpServletResponse.SC_NOT_FOUND, "Invalid repository: " + archivaLocator.getRepositoryId());
        }
        ManagedRepositoryContent managedRepositoryContent = repo.getContent();
        if (managedRepositoryContent == null) {
            log.error("Inconsistency detected. Repository content not found for '{}'", archivaLocator.getRepositoryId());
            throw new DavException(HttpServletResponse.SC_NOT_FOUND, "Invalid repository: " + archivaLocator.getRepositoryId());
        }
        log.debug("Managed repository '{}' accessed by '{}'", managedRepositoryContent.getId(), activePrincipal);
        resource = processRepository(request, archivaLocator, activePrincipal, managedRepositoryContent, repo);
        String logicalResource = getLogicalResource(archivaLocator, null, false);
        resourcesInAbsolutePath.add(Paths.get(managedRepositoryContent.getRepoRoot(), logicalResource).toAbsolutePath().toString());
    }
    String requestedResource = request.getRequestURI();
    // merge metadata only when requested via the repo group
    if ((repositoryRequest.isMetadata(requestedResource) || repositoryRequest.isMetadataSupportFile(requestedResource)) && repoGroupConfig != null) {
        // this should only be at the project level not version level!
        if (isProjectReference(requestedResource)) {
            ArchivaDavResource res = (ArchivaDavResource) resource;
            String filePath = StringUtils.substringBeforeLast(res.getLocalResource().toAbsolutePath().toString().replace('\\', '/'), "/");
            filePath = filePath + "/maven-metadata-" + repoGroupConfig.getId() + ".xml";
            // for MRM-872 handle checksums of the merged metadata files
            if (repositoryRequest.isSupportFile(requestedResource)) {
                Path metadataChecksum = Paths.get(filePath + "." + StringUtils.substringAfterLast(requestedResource, "."));
                if (Files.exists(metadataChecksum)) {
                    LogicalResource logicalResource = new LogicalResource(getLogicalResource(archivaLocator, null, false));
                    resource = new ArchivaDavResource(metadataChecksum.toAbsolutePath().toString(), logicalResource.getPath(), null, request.getRemoteAddr(), activePrincipal, request.getDavSession(), archivaLocator, this, mimeTypes, auditListeners, scheduler, fileLockManager);
                }
            } else {
                if (resourcesInAbsolutePath != null && resourcesInAbsolutePath.size() > 1) {
                    // merge the metadata of all repos under group
                    ArchivaRepositoryMetadata mergedMetadata = new ArchivaRepositoryMetadata();
                    for (String resourceAbsPath : resourcesInAbsolutePath) {
                        try {
                            Path metadataFile = Paths.get(resourceAbsPath);
                            ArchivaRepositoryMetadata repoMetadata = MavenMetadataReader.read(metadataFile);
                            mergedMetadata = RepositoryMetadataMerge.merge(mergedMetadata, repoMetadata);
                        } catch (XMLException e) {
                            throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error occurred while reading metadata file.");
                        } catch (RepositoryMetadataException r) {
                            throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error occurred while merging metadata file.");
                        }
                    }
                    try {
                        Path resourceFile = writeMergedMetadataToFile(mergedMetadata, filePath);
                        LogicalResource logicalResource = new LogicalResource(getLogicalResource(archivaLocator, null, false));
                        resource = new ArchivaDavResource(resourceFile.toAbsolutePath().toString(), logicalResource.getPath(), null, request.getRemoteAddr(), activePrincipal, request.getDavSession(), archivaLocator, this, mimeTypes, auditListeners, scheduler, fileLockManager);
                    } catch (RepositoryMetadataException r) {
                        throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error occurred while writing metadata file.");
                    } catch (IOException ie) {
                        throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error occurred while generating checksum files.");
                    } catch (DigesterException de) {
                        throw new DavException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Error occurred while generating checksum files." + de.getMessage());
                    }
                }
            }
        }
    }
    setHeaders(response, locator, resource, false);
    // compatibility with MRM-440 to ensure browsing the repository works ok
    if (resource.isCollection() && !request.getRequestURI().endsWith("/")) {
        throw new BrowserRedirectException(resource.getHref());
    }
    resource.addLockManager(lockManager);
    return resource;
}
Also used : RepositoryGroupConfiguration(org.apache.archiva.configuration.RepositoryGroupConfiguration) Path(java.nio.file.Path) DavResource(org.apache.jackrabbit.webdav.DavResource) ManagedRepository(org.apache.archiva.repository.ManagedRepository) DavException(org.apache.jackrabbit.webdav.DavException) ArrayList(java.util.ArrayList) RemoteRepository(org.apache.archiva.admin.model.beans.RemoteRepository) IOException(java.io.IOException) RepositoryAdminException(org.apache.archiva.admin.model.RepositoryAdminException) XMLException(org.apache.archiva.xml.XMLException) RepositoryMetadataException(org.apache.archiva.repository.metadata.RepositoryMetadataException) ManagedRepositoryContent(org.apache.archiva.repository.ManagedRepositoryContent) DigesterException(org.codehaus.plexus.digest.DigesterException) IndexingContext(org.apache.maven.index.context.IndexingContext) ArchivaRepositoryMetadata(org.apache.archiva.model.ArchivaRepositoryMetadata)

Aggregations

IndexingContext (org.apache.maven.index.context.IndexingContext)38 Path (java.nio.file.Path)30 ArchivaIndexingContext (org.apache.archiva.indexer.ArchivaIndexingContext)27 IOException (java.io.IOException)24 UnsupportedBaseContextException (org.apache.archiva.indexer.UnsupportedBaseContextException)21 IndexCreationFailedException (org.apache.archiva.indexer.IndexCreationFailedException)15 RemoteRepository (org.apache.archiva.repository.RemoteRepository)15 ManagedRepository (org.apache.archiva.repository.ManagedRepository)14 Inject (javax.inject.Inject)12 IndexUpdateFailedException (org.apache.archiva.indexer.IndexUpdateFailedException)12 UnsupportedRepositoryTypeException (org.apache.archiva.repository.UnsupportedRepositoryTypeException)12 Indexer (org.apache.maven.index.Indexer)12 IndexPacker (org.apache.maven.index.packer.IndexPacker)12 IndexPackingRequest (org.apache.maven.index.packer.IndexPackingRequest)12 IndexFormatTooOldException (org.apache.maven.index_shaded.lucene.index.IndexFormatTooOldException)12 Logger (org.slf4j.Logger)12 LoggerFactory (org.slf4j.LoggerFactory)12 Service (org.springframework.stereotype.Service)12 URI (java.net.URI)11 Files (java.nio.file.Files)11