Class RepositoryIndexer
java.lang.Object
org.apache.maven.index.examples.indexing.RepositoryIndexer
This class provides means to index and search for artifacts in a repository on the file system.
- Author:
- mtodorov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArtifactToIndex(File artifactFile, ArtifactInfo artifactInfo) voidaddArtifactToIndex(String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier) voidclose()voidclose(boolean deleteFiles) voiddelete(Collection<ArtifactInfo> artifacts) intsearchBySHA1(String checksum) voidsetIndexDir(File indexDir) voidsetIndexer(Indexer indexer) voidsetIndexers(List<IndexCreator> indexers) voidsetIndexingContext(IndexingContext indexingContext) voidsetRepositoryBasedir(File repositoryBasedir) voidsetRepositoryId(String repositoryId) voidsetScanner(Scanner scanner)
-
Constructor Details
-
RepositoryIndexer
public RepositoryIndexer()
-
-
Method Details
-
close
- Throws:
IOException
-
close
- Throws:
IOException
-
delete
- Throws:
IOException
-
search
public Set<ArtifactInfo> search(String groupId, String artifactId, String version, String packaging, String classifier) throws IOException - Throws:
IOException
-
search
public Set<ArtifactInfo> search(String queryText) throws org.apache.lucene.queryparser.classic.ParseException, IOException - Throws:
org.apache.lucene.queryparser.classic.ParseExceptionIOException
-
searchBySHA1
- Throws:
IOException
-
index
-
addArtifactToIndex
- Throws:
IOException
-
addArtifactToIndex
public void addArtifactToIndex(String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier) throws IOException - Throws:
IOException
-
getIndexer
-
setIndexer
-
getScanner
-
setScanner
-
getIndexers
-
setIndexers
-
getIndexingContext
-
setIndexingContext
-
getRepositoryId
-
setRepositoryId
-
getRepositoryBasedir
-
setRepositoryBasedir
-
getIndexDir
-
setIndexDir
-