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 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.booleanDetermines whether this artifact uses a snapshot version.default Stringkey()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, extension, classifier, and version.- 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:
 trueif the artifact is a snapshot,falseotherwise- See Also:
 
 - 
toCoordinate
Shortcut forsession.createArtifactCoordinate(artifact)- Returns:
 - an 
ArtifactCoordinate - See Also:
 
 
 -