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
ConstructorDescriptionDefaultArtifact
(InternalSession session, org.eclipse.aether.artifact.Artifact artifact) -
Method Summary
Modifier and TypeMethodDescriptionboolean
org.eclipse.aether.artifact.Artifact
The artifactId of the artifact.The classifier of the artifact.The file extension of the artifact.The groupId of the artifact.The version of the artifact.int
hashCode()
boolean
Determines 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:Artifact
Returns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, extension, classifier, and version. -
getGroupId
Description copied from interface:Artifact
The groupId of the artifact.- Specified by:
getGroupId
in interfaceArtifact
- Returns:
- the groupId
-
getArtifactId
Description copied from interface:Artifact
The artifactId of the artifact.- Specified by:
getArtifactId
in interfaceArtifact
- Returns:
- the artifactId
-
getVersion
Description copied from interface:Artifact
The version of the artifact.- Specified by:
getVersion
in interfaceArtifact
- Returns:
- the version
-
getExtension
Description copied from interface:Artifact
The file extension of the artifact.- Specified by:
getExtension
in interfaceArtifact
- Returns:
- the extension
-
getClassifier
Description copied from interface:Artifact
The classifier of the artifact.- Specified by:
getClassifier
in interfaceArtifact
- Returns:
- the classifier or an empty string if none, never
null
-
isSnapshot
public boolean isSnapshot()Description copied from interface:Artifact
Determines whether this artifact uses a snapshot version.- Specified by:
isSnapshot
in interfaceArtifact
- Returns:
true
if the artifact is a snapshot,false
otherwise- See Also:
-
toCoordinate
Description copied from interface:Artifact
Shortcut forsession.createArtifactCoordinate(artifact)
- Specified by:
toCoordinate
in interfaceArtifact
- Returns:
- an
ArtifactCoordinate
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-