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
FieldsModifier and TypeFieldDescriptionstatic final IndexerFieldstatic final IndexerFieldNexusAnalyzer makes exception with this field only, to keep backward compatibility with old consumers of nexus-indexer.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the indexer fields that this IndexCreator introduces to index.voidpopulateArtifactInfo(ArtifactContext artifactContext) Populate anArtifactContextwith information about corresponding artifact.toString()booleanupdateArtifactInfo(org.apache.lucene.document.Document doc, ArtifactInfo artifactInfo) Update anArtifactInfofrom given LuceneDocument.voidupdateDocument(ArtifactInfo ai, org.apache.lucene.document.Document doc) Update LuceneDocumentfrom a givenArtifactInfo.voidupdateLegacyDocument(ArtifactInfo ai, org.apache.lucene.document.Document doc) Update a legacy LuceneDocumentfrom 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:IndexCreatorPopulate anArtifactContextwith information about corresponding artifact.- Specified by:
populateArtifactInfoin interfaceIndexCreator- Throws:
IOException
-
updateDocument
Description copied from interface:IndexCreatorUpdate LuceneDocumentfrom a givenArtifactInfo.- Specified by:
updateDocumentin interfaceIndexCreator
-
updateLegacyDocument
Description copied from interface:LegacyDocumentUpdaterUpdate a legacy LuceneDocumentfrom theArtifactInfo.- Specified by:
updateLegacyDocumentin interfaceLegacyDocumentUpdater
-
updateArtifactInfo
public boolean updateArtifactInfo(org.apache.lucene.document.Document doc, ArtifactInfo artifactInfo) Description copied from interface:IndexCreatorUpdate anArtifactInfofrom given LuceneDocument.- Specified by:
updateArtifactInfoin interfaceIndexCreator- Returns:
- true is artifact info has been updated
-
toString
-
getIndexerFields
Description copied from interface:IndexCreatorReturns the indexer fields that this IndexCreator introduces to index.- Specified by:
getIndexerFieldsin interfaceIndexCreator- Returns:
-