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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArtifactToIndex
(File artifactFile, org.apache.maven.index.ArtifactInfo artifactInfo) void
addArtifactToIndex
(String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier) void
close()
void
close
(boolean deleteFiles) void
delete
(Collection<org.apache.maven.index.ArtifactInfo> artifacts) org.apache.maven.index.Indexer
List
<org.apache.maven.index.context.IndexCreator> org.apache.maven.index.context.IndexingContext
org.apache.maven.index.Scanner
int
Set
<org.apache.maven.index.ArtifactInfo> Set
<org.apache.maven.index.ArtifactInfo> Set
<org.apache.maven.index.ArtifactInfo> searchBySHA1
(String checksum) void
setIndexDir
(File indexDir) void
setIndexer
(org.apache.maven.index.Indexer indexer) void
setIndexers
(List<org.apache.maven.index.context.IndexCreator> indexers) void
setIndexingContext
(org.apache.maven.index.context.IndexingContext indexingContext) void
setRepositoryBasedir
(File repositoryBasedir) void
setRepositoryId
(String repositoryId) void
setScanner
(org.apache.maven.index.Scanner scanner)
-
Constructor Details
-
RepositoryIndexer
public RepositoryIndexer()
-
-
Method Details
-
close
- Throws:
IOException
-
close
- Throws:
IOException
-
delete
- Throws:
IOException
-
search
public Set<org.apache.maven.index.ArtifactInfo> search(String groupId, String artifactId, String version, String packaging, String classifier) throws IOException - Throws:
IOException
-
search
public Set<org.apache.maven.index.ArtifactInfo> search(String queryText) throws org.apache.lucene.queryparser.classic.ParseException, IOException - Throws:
org.apache.lucene.queryparser.classic.ParseException
IOException
-
searchBySHA1
- Throws:
IOException
-
index
-
addArtifactToIndex
public void addArtifactToIndex(File artifactFile, org.apache.maven.index.ArtifactInfo artifactInfo) throws IOException - 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
public org.apache.maven.index.Indexer getIndexer() -
setIndexer
public void setIndexer(org.apache.maven.index.Indexer indexer) -
getScanner
public org.apache.maven.index.Scanner getScanner() -
setScanner
public void setScanner(org.apache.maven.index.Scanner scanner) -
getIndexers
-
setIndexers
-
getIndexingContext
public org.apache.maven.index.context.IndexingContext getIndexingContext() -
setIndexingContext
public void setIndexingContext(org.apache.maven.index.context.IndexingContext indexingContext) -
getRepositoryId
-
setRepositoryId
-
getRepositoryBasedir
-
setRepositoryBasedir
-
getIndexDir
-
setIndexDir
-