Package org.apache.maven.api
Interface Artifact
- All Known Subinterfaces:
- Dependency
- All Known Implementing Classes:
- DefaultArtifact,- DefaultDependency
An artifact points to a resource such as a jar file or war application.
- Since:
- 4.0.0
- 
Method SummaryModifier 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.booleanDetermines whether this artifact uses a snapshot version.default Stringkey()Returns a unique identifier for this artifact.Shortcut forsession.createArtifactCoordinate(artifact)
- 
Method Details- 
keyReturns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, extension, classifier, and version.- Returns:
- the unique identifier
 
- 
getGroupIdThe groupId of the artifact.- Returns:
- the groupId
 
- 
getArtifactIdThe artifactId of the artifact.- Returns:
- the artifactId
 
- 
getVersionThe version of the artifact.- Returns:
- the version
 
- 
getClassifierThe classifier of the artifact.- Returns:
- the classifier or an empty string if none, never null
 
- 
getExtensionThe file extension of the artifact.- Returns:
- the extension
 
- 
isSnapshotboolean isSnapshot()Determines whether this artifact uses a snapshot version.- Returns:
- trueif the artifact is a snapshot,- falseotherwise
- See Also:
 
- 
toCoordinateShortcut forsession.createArtifactCoordinate(artifact)- Returns:
- an ArtifactCoordinate
- See Also:
 
 
-