public void addArtifactsToIndex( Collection<ArtifactContext> acs, IndexingContext context ) throws IOException { indexer.addArtifactsToIndex( acs, context ); }
public void addArtifactsToIndex( Collection<ArtifactContext> acs, IndexingContext context ) throws IOException { indexer.addArtifactsToIndex( acs, context ); }
public void addArtifactsToIndex( Collection<ArtifactContext> acs, IndexingContext context ) throws IOException { indexer.addArtifactsToIndex( acs, context ); }
/** * Delegates to the {@link IndexerEngine} to update artifact to the index */ public void addArtifactToIndex( ArtifactContext ac, IndexingContext context ) throws IOException { indexer.addArtifactsToIndex( Collections.singleton( ac ), context ); }
/** * Delegates to the {@link IndexerEngine} to update artifact to the index */ public void addArtifactToIndex( ArtifactContext ac, IndexingContext context ) throws IOException { indexer.addArtifactsToIndex( Collections.singleton( ac ), context ); }
/** * Delegates to the {@link IndexerEngine} to update artifact to the index */ public void addArtifactToIndex( ArtifactContext ac, IndexingContext context ) throws IOException { indexer.addArtifactsToIndex( Collections.singleton( ac ), context ); }
public void addArtifactToIndex( final File artifactFile, final ArtifactInfo artifactInfo ) throws IOException { getIndexer().addArtifactsToIndex( asList( new ArtifactContext( null, artifactFile, null, artifactInfo, null ) ), indexingContext ); }
@Override public void addArtifactsToIndex( final ArchivaIndexingContext context, final Collection<URI> artifactReference ) throws IndexUpdateFailedException { final URI ctxUri = context.getPath(); executeUpdateFunction(context, indexingContext -> { Collection<ArtifactContext> artifacts = artifactReference.stream().map(r -> artifactContextProducer.getArtifactContext(indexingContext, Paths.get(ctxUri.resolve(r)).toFile())).collect(Collectors.toList()); try { indexer.addArtifactsToIndex(artifacts, indexingContext); } catch (IOException e) { log.error("IOException while adding artifact {}", e.getMessage(), e); throw new IndexUpdateFailedException("Error occured while adding artifact to index of "+context.getId() + (StringUtils.isNotEmpty(e.getMessage()) ? ": "+e.getMessage() : "")); } }); }
@Override public void artifactDiscovered( final ArtifactContext ac ) { try { LOGGER.debug( "Adding artifact gav: {}; ctx id: {}; idx dir: {}", new String[]{ ac.getGav().toString(), context.getId(), context.getIndexDirectory().toString() } ); getIndexer().addArtifactsToIndex( asList( ac ), context ); totalFiles++; } catch ( IOException ex ) { LOGGER.error( "Artifact index error", ex ); } } }
public void addArtifactToIndex( String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier ) throws IOException { ArtifactInfo artifactInfo = new ArtifactInfo( repository, groupId, artifactId, version, classifier, extension ); if ( extension != null ) { artifactInfo.setFieldValue( MAVEN.EXTENSION, extension ); } LOGGER.debug( "Adding artifact: {}; repo: {}; type: {}", new String[]{ artifactInfo.getUinfo(), repository, extension } ); getIndexer().addArtifactsToIndex( asList( new ArtifactContext( null, artifactFile, null, artifactInfo, artifactInfo.calculateGav() ) ), indexingContext ); }