Package org.apache.maven.internal.impl
Class DefaultArtifact
java.lang.Object
org.apache.maven.internal.impl.DefaultArtifact
- All Implemented Interfaces:
- Artifact
- Direct Known Subclasses:
- DefaultDownloadedArtifact,- DefaultProducedArtifact
A wrapper class around a maven resolver artifact.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final org.eclipse.aether.artifact.Artifactprotected final Stringprotected final InternalSession
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultArtifact(InternalSession session, org.eclipse.aether.artifact.Artifact artifact) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanorg.eclipse.aether.artifact.ArtifactReturns the identifier of the artifact.Returns the version or meta-version of the artifact.Returns the classifier of the artifact.Returns the file extension of the artifact.Returns the group identifier of the artifact.Returns the version of the artifact.inthashCode()booleanDetermines whether this artifact uses a snapshot version.key()Returns a unique identifier for this artifact.Returns coordinates with the same identifiers as this artifact.toString()
- 
Field Details- 
session
- 
artifact
- 
key
 
- 
- 
Constructor Details- 
DefaultArtifactpublic DefaultArtifact(@Nonnull InternalSession session, @Nonnull org.eclipse.aether.artifact.Artifact artifact) 
 
- 
- 
Method Details- 
getArtifactpublic org.eclipse.aether.artifact.Artifact getArtifact()
- 
keyDescription copied from interface:ArtifactReturns a unique identifier for this artifact.. The identifier is composed of groupId, artifactId, extension, classifier, and version.
- 
getGroupIdDescription copied from interface:ArtifactReturns the group identifier of the artifact..- Specified by:
- getGroupIdin interface- Artifact
- Returns:
- the group identifier of the artifact
- See Also:
 
- 
getArtifactIdDescription copied from interface:ArtifactReturns the identifier of the artifact..- Specified by:
- getArtifactIdin interface- Artifact
- Returns:
- the identifier of the artifact
- See Also:
 
- 
getVersionDescription copied from interface:ArtifactReturns the version of the artifact.. Contrarily toArtifactCoordinates, eachArtifactis associated to a specific version instead of a range of versions. If the base version contains a meta-version such asSNAPSHOT, those keywords are replaced by, for example, the actual timestamp.- Specified by:
- getVersionin interface- Artifact
- Returns:
- the version of the artifact
- See Also:
 
- 
getBaseVersionDescription copied from interface:ArtifactReturns the version or meta-version of the artifact.. A meta-version is a version suffixed with theSNAPSHOTkeyword. Meta-versions are represented in a base version by their symbols (e.g.,SNAPSHOT), while they are replaced by, for example, the actual timestamp in the version.- Specified by:
- getBaseVersionin interface- Artifact
- Returns:
- the version or meta-version of the artifact
 
- 
getExtensionDescription copied from interface:ArtifactReturns the file extension of the artifact. The dot separator is not included in the returned string.- Specified by:
- getExtensionin interface- Artifact
- Returns:
- the file extension or an empty string if none, never null
- See Also:
 
- 
getClassifierDescription copied from interface:ArtifactReturns the classifier of the artifact.- Specified by:
- getClassifierin interface- Artifact
- Returns:
- the classifier or an empty string if none, never null
- See Also:
 
- 
isSnapshotpublic boolean isSnapshot()Description copied from interface:ArtifactDetermines whether this artifact uses a snapshot version.- Specified by:
- isSnapshotin interface- Artifact
- Returns:
- trueif the artifact is a snapshot,- falseotherwise
- See Also:
 
- 
toCoordinatesDescription copied from interface:ArtifactReturns coordinates with the same identifiers as this artifact.. This is a shortcut forsession.createArtifactCoordinates(artifact).- Specified by:
- toCoordinatesin interface- Artifact
- Returns:
- coordinates with the same identifiers as this artifact
- See Also:
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-