Package org.apache.maven.internal.impl
Class DefaultArtifact
java.lang.Object
org.apache.maven.internal.impl.DefaultArtifact
- All Implemented Interfaces:
Artifact
A wrapper class around a maven resolver artifact.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultArtifact(InternalSession session, org.eclipse.aether.artifact.Artifact artifact) -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.eclipse.aether.artifact.ArtifactThe artifactId of the artifact.The base version of the artifact.The classifier of the artifact.The file extension of the artifact.The groupId of the artifact.The version of the artifact.inthashCode()booleanDetermines whether this artifact uses a snapshot version.key()Returns a unique identifier for this artifact.Shortcut forsession.createArtifactCoordinate(artifact)toString()
-
Constructor Details
-
DefaultArtifact
public DefaultArtifact(@Nonnull InternalSession session, @Nonnull org.eclipse.aether.artifact.Artifact artifact)
-
-
Method Details
-
getArtifact
public org.eclipse.aether.artifact.Artifact getArtifact() -
key
Description copied from interface:ArtifactReturns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, extension, classifier, and version. -
getGroupId
Description copied from interface:ArtifactThe groupId of the artifact.- Specified by:
getGroupIdin interfaceArtifact- Returns:
- the groupId
-
getArtifactId
Description copied from interface:ArtifactThe artifactId of the artifact.- Specified by:
getArtifactIdin interfaceArtifact- Returns:
- the artifactId
-
getVersion
Description copied from interface:ArtifactThe version of the artifact.- Specified by:
getVersionin interfaceArtifact- Returns:
- the version
-
getBaseVersion
Description copied from interface:ArtifactThe base version of the artifact.- Specified by:
getBaseVersionin interfaceArtifact- Returns:
- the version
-
getExtension
Description copied from interface:ArtifactThe file extension of the artifact.- Specified by:
getExtensionin interfaceArtifact- Returns:
- the extension
-
getClassifier
Description copied from interface:ArtifactThe classifier of the artifact.- Specified by:
getClassifierin interfaceArtifact- Returns:
- the classifier or an empty string if none, never
null
-
isSnapshot
public boolean isSnapshot()Description copied from interface:ArtifactDetermines whether this artifact uses a snapshot version.- Specified by:
isSnapshotin interfaceArtifact- Returns:
trueif the artifact is a snapshot,falseotherwise- See Also:
-
toCoordinate
Description copied from interface:ArtifactShortcut forsession.createArtifactCoordinate(artifact)- Specified by:
toCoordinatein interfaceArtifact- Returns:
- an
ArtifactCoordinate - See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-