Package org.apache.maven.index
Class ArtifactContext
- java.lang.Object
-
- org.apache.maven.index.ArtifactContext
-
public class ArtifactContext extends java.lang.ObjectAn artifact context used to provide information about artifact during scanning. It is passed to theIndexCreator, which can populateArtifactInfofor the given artifact.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Fileartifactprivate ArtifactInfoartifactInfoprivate java.util.List<java.lang.Exception>errorsprivate Gavgavprivate static org.slf4j.LoggerLOGGERprivate java.io.Filemetadataprivate java.io.Filepom
-
Constructor Summary
Constructors Constructor Description ArtifactContext(java.io.File pom, java.io.File artifact, java.io.File metadata, ArtifactInfo artifactInfo, Gav gav)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(java.lang.Exception e)org.apache.lucene.document.DocumentcreateDocument(IndexingContext context)Creates Lucene Document usingIndexCreators from the givenIndexingContext.java.io.FilegetArtifact()ArtifactInfogetArtifactInfo()java.util.List<java.lang.Exception>getErrors()GavgetGav()java.io.FilegetMetadata()java.io.FilegetPom()org.apache.maven.model.ModelgetPomModel()
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
pom
private final java.io.File pom
-
artifact
private final java.io.File artifact
-
metadata
private final java.io.File metadata
-
artifactInfo
private final ArtifactInfo artifactInfo
-
gav
private final Gav gav
-
errors
private final java.util.List<java.lang.Exception> errors
-
-
Constructor Detail
-
ArtifactContext
public ArtifactContext(java.io.File pom, java.io.File artifact, java.io.File metadata, ArtifactInfo artifactInfo, Gav gav) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
getPom
public java.io.File getPom()
-
getPomModel
public org.apache.maven.model.Model getPomModel()
-
getArtifact
public java.io.File getArtifact()
-
getMetadata
public java.io.File getMetadata()
-
getArtifactInfo
public ArtifactInfo getArtifactInfo()
-
getGav
public Gav getGav()
-
getErrors
public java.util.List<java.lang.Exception> getErrors()
-
addError
public void addError(java.lang.Exception e)
-
createDocument
public org.apache.lucene.document.Document createDocument(IndexingContext context)
Creates Lucene Document usingIndexCreators from the givenIndexingContext.
-
-