@Override protected String getGroupKey( ArtifactInfo artifactInfo ) { return artifactInfo.getRepository() + ":" + artifactInfo.getGroupId(); }
@Override protected String getGroupKey( ArtifactInfo artifactInfo ) { return artifactInfo.getRepository() + ":" + artifactInfo.getGroupId(); }
@Override protected String getGroupKey( ArtifactInfo artifactInfo ) { return artifactInfo.getRepository() + ":" + artifactInfo.getGroupId(); }
public boolean accepts( IndexingContext ctx, ArtifactInfo ai ) { String key = ai.getGroupId() + ai.getArtifactId() + ai.getPackaging() + ai.getClassifier(); if ( !repositoriesIgnored ) { key = ai.getRepository() + key; } if ( gas.contains( key ) ) { return false; } else { gas.add( key ); postprocess( ctx, ai ); return true; } }
public boolean accepts( IndexingContext ctx, ArtifactInfo ai ) { String key = ai.getGroupId() + ai.getArtifactId() + ai.getPackaging() + ai.getClassifier(); if ( !repositoriesIgnored ) { key = ai.getRepository() + key; } if ( gas.contains( key ) ) { return false; } else { gas.add( key ); postprocess( ctx, ai ); return true; } }
public boolean accepts( IndexingContext ctx, ArtifactInfo ai ) { String key = ai.getGroupId() + ai.getArtifactId() + ai.getPackaging() + ai.getClassifier(); if ( !repositoriesIgnored ) { key = ai.getRepository() + key; } if ( gas.contains( key ) ) { return false; } else { gas.add( key ); postprocess( ctx, ai ); return true; } }
@Override protected String getGroupKey( ArtifactInfo artifactInfo ) { return artifactInfo.getRepository() + ":" + artifactInfo.getGroupId() + ":" + artifactInfo.getArtifactId() + ":" + artifactInfo.getVersion() + ":" + artifactInfo.getClassifier(); }
@Override protected String getGroupKey( ArtifactInfo artifactInfo ) { return artifactInfo.getRepository() + ":" + artifactInfo.getGroupId() + ":" + artifactInfo.getArtifactId() + ":" + artifactInfo.getVersion() + ":" + artifactInfo.getClassifier(); }
@Override protected String getGroupKey( ArtifactInfo artifactInfo ) { return artifactInfo.getRepository() + ":" + artifactInfo.getGroupId() + ":" + artifactInfo.getArtifactId() + ":" + artifactInfo.getVersion() + ":" + artifactInfo.getClassifier(); }
private boolean applyArtifactInfoFilters( ArtifactInfo artifactInfo, List<? extends ArtifactInfoFilter> artifactInfoFilters, Map<String, SearchResultHit> currentResult ) { if ( artifactInfoFilters == null || artifactInfoFilters.isEmpty() ) { return true; } ArchivaArtifactModel artifact = new ArchivaArtifactModel(); artifact.setArtifactId( artifactInfo.getArtifactId() ); artifact.setClassifier( artifactInfo.getClassifier() ); artifact.setGroupId( artifactInfo.getGroupId() ); artifact.setRepositoryId( artifactInfo.getRepository() ); artifact.setVersion( artifactInfo.getVersion() ); artifact.setChecksumMD5( artifactInfo.getMd5() ); artifact.setChecksumSHA1( artifactInfo.getSha1() ); for ( ArtifactInfoFilter filter : artifactInfoFilters ) { if ( !filter.addArtifactInResult( artifact, currentResult ) ) { return false; } } return true; }
public ArchetypeCatalog getArchetypeCatalog( final Properties properties ) throws ArchetypeDataSourceException { final ArchetypeCatalog catalog = new ArchetypeCatalog(); try { final Map<String, String> repositories = getRepositoryMap(); final Query pq = indexer.constructQuery( MAVEN.PACKAGING, new SourcedSearchExpression( "maven-archetype" ) ); final FlatSearchRequest searchRequest = new FlatSearchRequest( pq ); searchRequest.setContexts( getIndexingContexts() ); final FlatSearchResponse searchResponse = indexer.searchFlat( searchRequest ); for ( ArtifactInfo info : searchResponse.getResults() ) { Archetype archetype = new Archetype(); archetype.setGroupId( info.getGroupId() ); archetype.setArtifactId( info.getArtifactId() ); archetype.setVersion( info.getVersion() ); archetype.setDescription( info.getDescription() ); archetype.setRepository( repositories.get( info.getRepository() ) ); catalog.addArchetype( archetype ); } } catch ( Exception ex ) { getLogger().error( "Unable to retrieve archetypes", ex ); } return catalog; }
public ArchetypeCatalog getArchetypeCatalog( final Properties properties ) { final ArchetypeCatalog catalog = new ArchetypeCatalog(); try { final Map<String, String> repositories = getRepositoryMap(); final Query pq = indexer.constructQuery( MAVEN.PACKAGING, new SourcedSearchExpression( "maven-archetype" ) ); final FlatSearchRequest searchRequest = new FlatSearchRequest( pq ); searchRequest.setContexts( getIndexingContexts() ); final FlatSearchResponse searchResponse = indexer.searchFlat( searchRequest ); for ( ArtifactInfo info : searchResponse.getResults() ) { Archetype archetype = new Archetype(); archetype.setGroupId( info.getGroupId() ); archetype.setArtifactId( info.getArtifactId() ); archetype.setVersion( info.getVersion() ); archetype.setDescription( info.getDescription() ); archetype.setRepository( repositories.get( info.getRepository() ) ); catalog.addArchetype( archetype ); } } catch ( Exception ex ) { getLogger().error( "Unable to retrieve archetypes", ex ); } return catalog; }
public ArchetypeCatalog getArchetypeCatalog( final Properties properties ) { final ArchetypeCatalog catalog = new ArchetypeCatalog(); try { final Map<String, String> repositories = getRepositoryMap(); final Query pq = indexer.constructQuery( MAVEN.PACKAGING, new SourcedSearchExpression( "maven-archetype" ) ); final FlatSearchRequest searchRequest = new FlatSearchRequest( pq ); searchRequest.setContexts( getIndexingContexts() ); final FlatSearchResponse searchResponse = indexer.searchFlat( searchRequest ); for ( ArtifactInfo info : searchResponse.getResults() ) { Archetype archetype = new Archetype(); archetype.setGroupId( info.getGroupId() ); archetype.setArtifactId( info.getArtifactId() ); archetype.setVersion( info.getVersion() ); archetype.setDescription( info.getDescription() ); archetype.setRepository( repositories.get( info.getRepository() ) ); catalog.addArchetype( archetype ); } } catch ( Exception ex ) { getLogger().error( "Unable to retrieve archetypes", ex ); } return catalog; }
hit.setArtifactId( artifactInfo.getArtifactId() ); hit.setGroupId( artifactInfo.getGroupId() ); hit.setRepositoryId( artifactInfo.getRepository() ); hit.addVersion( artifactInfo.getVersion() ); hit.setBundleExportPackage( artifactInfo.getBundleExportPackage() );