Package org.apache.maven.api
Interface Artifact
- All Known Subinterfaces:
Dependency
An artifact points to a resource such as a jar file or war application.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionThe 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.boolean
Determines whether this artifact uses a snapshot version.default String
key()
Returns a unique identifier for this artifact.Shortcut forsession.createArtifactCoordinate(artifact)
-
Method Details
-
key
Returns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, version, classifier, extension.- Returns:
- the unique identifier
-
getGroupId
The groupId of the artifact.- Returns:
- the groupId
-
getArtifactId
The artifactId of the artifact.- Returns:
- the artifactId
-
getVersion
The version of the artifact.- Returns:
- the version
-
getClassifier
The classifier of the artifact.- Returns:
- the classifier or an empty string if none, never
null
-
getExtension
The file extension of the artifact.- Returns:
- the extension
-
isSnapshot
boolean isSnapshot()Determines whether this artifact uses a snapshot version.- Returns:
true
if the artifact is a snapshot,false
otherwise- See Also:
-
toCoordinate
Shortcut forsession.createArtifactCoordinate(artifact)
- Returns:
- an
ArtifactCoordinate
- See Also:
-