Package org.apache.maven.index.creator
Class MavenPluginArtifactInfoIndexCreator
- java.lang.Object
-
- org.apache.maven.index.creator.AbstractIndexCreator
-
- org.apache.maven.index.creator.MavenPluginArtifactInfoIndexCreator
-
- All Implemented Interfaces:
IndexCreator
@Singleton @Named("maven-plugin") public class MavenPluginArtifactInfoIndexCreator extends AbstractIndexCreator
A Maven Plugin index creator used to provide information about Maven Plugins. It will collect the plugin prefix and the goals the plugin provides. Also, the Lucene document and the returned ArtifactInfo will be correctly filled with these information.
-
-
Field Summary
Fields Modifier and Type Field Description static IndexerField
FLD_PLUGIN_GOALS
static IndexerField
FLD_PLUGIN_PREFIX
static java.lang.String
ID
private static java.lang.String
MAVEN_PLUGIN_PACKAGING
-
Constructor Summary
Constructors Constructor Description MavenPluginArtifactInfoIndexCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkMavenPlugin(ArtifactInfo ai, java.io.File artifact)
java.util.Collection<IndexerField>
getIndexerFields()
Returns the indexer fields that this IndexCreator introduces to index.void
populateArtifactInfo(ArtifactContext ac)
Populate anArtifactContext
with information about corresponding artifact.java.lang.String
toString()
boolean
updateArtifactInfo(org.apache.lucene.document.Document doc, ArtifactInfo ai)
Update anArtifactInfo
from given LuceneDocument
.void
updateDocument(ArtifactInfo ai, org.apache.lucene.document.Document doc)
Update LuceneDocument
from a givenArtifactInfo
.-
Methods inherited from class org.apache.maven.index.creator.AbstractIndexCreator
bos, getCreatorDependencies, getId, getLogger, sob
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
MAVEN_PLUGIN_PACKAGING
private static final java.lang.String MAVEN_PLUGIN_PACKAGING
- See Also:
- Constant Field Values
-
FLD_PLUGIN_PREFIX
public static final IndexerField FLD_PLUGIN_PREFIX
-
FLD_PLUGIN_GOALS
public static final IndexerField FLD_PLUGIN_GOALS
-
-
Method Detail
-
populateArtifactInfo
public void populateArtifactInfo(ArtifactContext ac)
Description copied from interface:IndexCreator
Populate anArtifactContext
with information about corresponding artifact.
-
checkMavenPlugin
private void checkMavenPlugin(ArtifactInfo ai, java.io.File artifact)
-
updateDocument
public void updateDocument(ArtifactInfo ai, org.apache.lucene.document.Document doc)
Description copied from interface:IndexCreator
Update LuceneDocument
from a givenArtifactInfo
.
-
updateArtifactInfo
public boolean updateArtifactInfo(org.apache.lucene.document.Document doc, ArtifactInfo ai)
Description copied from interface:IndexCreator
Update anArtifactInfo
from given LuceneDocument
.- Returns:
- true is artifact info has been updated
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getIndexerFields
public java.util.Collection<IndexerField> getIndexerFields()
Description copied from interface:IndexCreator
Returns the indexer fields that this IndexCreator introduces to index.- Returns:
-
-