Package org.apache.maven.index.creator
Class JarFileContentsIndexCreator
java.lang.Object
org.apache.maven.index.creator.AbstractIndexCreator
org.apache.maven.index.creator.JarFileContentsIndexCreator
- All Implemented Interfaces:
IndexCreator
,LegacyDocumentUpdater
@Singleton
@Named("jarContent")
public class JarFileContentsIndexCreator
extends AbstractIndexCreator
implements LegacyDocumentUpdater
An index creator used to index Java class names from a Maven artifact (JAR, ZIP or WAR for now).
Will open up the file and collect all the class names from it.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IndexerField
static final IndexerField
NexusAnalyzer makes exception with this field only, to keep backward compatibility with old consumers of nexus-indexer.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the indexer fields that this IndexCreator introduces to index.void
populateArtifactInfo
(ArtifactContext artifactContext) Populate anArtifactContext
with information about corresponding artifact.toString()
boolean
updateArtifactInfo
(org.apache.lucene.document.Document doc, ArtifactInfo artifactInfo) Update anArtifactInfo
from given LuceneDocument
.void
updateDocument
(ArtifactInfo ai, org.apache.lucene.document.Document doc) Update LuceneDocument
from a givenArtifactInfo
.void
updateLegacyDocument
(ArtifactInfo ai, org.apache.lucene.document.Document doc) Update a legacy LuceneDocument
from theArtifactInfo
.Methods inherited from class org.apache.maven.index.creator.AbstractIndexCreator
bos, getCreatorDependencies, getId, getLogger, sob
-
Field Details
-
ID
- See Also:
-
FLD_CLASSNAMES
-
FLD_CLASSNAMES_KW
NexusAnalyzer makes exception with this field only, to keep backward compatibility with old consumers of nexus-indexer. This field is here for "backward" compat only! The order is important too! FLD_CLASSNAMES must be registered BEFORE FLD_CLASSNAMES_KW!
-
-
Constructor Details
-
JarFileContentsIndexCreator
public JarFileContentsIndexCreator()
-
-
Method Details
-
populateArtifactInfo
Description copied from interface:IndexCreator
Populate anArtifactContext
with information about corresponding artifact.- Specified by:
populateArtifactInfo
in interfaceIndexCreator
- Throws:
IOException
-
updateDocument
Description copied from interface:IndexCreator
Update LuceneDocument
from a givenArtifactInfo
.- Specified by:
updateDocument
in interfaceIndexCreator
-
updateLegacyDocument
Description copied from interface:LegacyDocumentUpdater
Update a legacy LuceneDocument
from theArtifactInfo
.- Specified by:
updateLegacyDocument
in interfaceLegacyDocumentUpdater
-
updateArtifactInfo
public boolean updateArtifactInfo(org.apache.lucene.document.Document doc, ArtifactInfo artifactInfo) Description copied from interface:IndexCreator
Update anArtifactInfo
from given LuceneDocument
.- Specified by:
updateArtifactInfo
in interfaceIndexCreator
- Returns:
- true is artifact info has been updated
-
toString
-
getIndexerFields
Description copied from interface:IndexCreator
Returns the indexer fields that this IndexCreator introduces to index.- Specified by:
getIndexerFields
in interfaceIndexCreator
- Returns:
-