public void addArtifactToIndex( final File artifactFile, final ArtifactInfo artifactInfo ) throws IOException { getIndexer().addArtifactsToIndex( asList( new ArtifactContext( null, artifactFile, null, artifactInfo, null ) ), indexingContext ); }
public void delete( final Collection<ArtifactInfo> artifacts ) throws IOException { final List<ArtifactContext> delete = new ArrayList<>(); for ( final ArtifactInfo artifact : artifacts ) { LOGGER.debug( "Deleting artifact: {}; ctx id: {}; idx dir: {}", new String[]{ artifact.toString(), indexingContext.getId(), indexingContext.getIndexDirectory().toString() } ); delete.add( new ArtifactContext( null, null, null, artifact, null ) ); } getIndexer().deleteArtifactsFromIndex( delete, indexingContext ); }
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 ); }
return new ArtifactContext(ac.getPom(), ac.getArtifact(), ac.getMetadata(), new ArtifactInfo(ai.repository, ai.groupId, ai.artifactId, ai.version, null) { private String uinfo = null; @Override public String getUinfo() {
final ArtifactContext ac = new ArtifactContext(null, null, null, ai, ai.calculateGav()); if (contextPath == null || context.getGavCalculator().gavToPath(ac.getGav()).startsWith(contextPath)) {
return new ArtifactContext( pom, artifact, metadata, ai, gav );
return new ArtifactContext( pom, artifact, metadata, ai, gav );
return new ArtifactContext( pom, artifact, metadata, ai, gav );
ArtifactContext ac = new ArtifactContext( null, null, null, ai, ai.calculateGav() );
ArtifactContext ac = new ArtifactContext( null, null, null, ai, ai.calculateGav() );
ArtifactContext ac = new ArtifactContext( null, null, null, ai, ai.calculateGav() );
ac = new ArtifactContext(null, null, null, ai, igav);