Class ArtifactStub
java.lang.Object
org.apache.maven.api.plugin.testing.stubs.ArtifactStub
- All Implemented Interfaces:
Artifact
- Direct Known Subclasses:
ProducedArtifactStub
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the identifier of the artifact.Returns the version or meta-version of the artifact.Returns the classifier of the artifact.Returns the file extension of the artifact.Returns the group identifier of the artifact.Returns the version of the artifact.inthashCode()booleanDetermines whether this artifact uses a snapshot version.voidsetArtifactId(String artifactId) voidsetBaseVersion(String baseVersion) voidsetClassifier(String classifier) voidsetExtension(String extension) voidsetGroupId(String groupId) voidsetVersion(String version) Returns coordinates with the same identifiers as this artifact.toString()
-
Constructor Details
-
ArtifactStub
public ArtifactStub() -
ArtifactStub
-
-
Method Details
-
getGroupId
Description copied from interface:ArtifactReturns the group identifier of the artifact.- Specified by:
getGroupIdin interfaceArtifact- Returns:
- the group identifier of the artifact
- See Also:
-
setGroupId
-
getArtifactId
Description copied from interface:ArtifactReturns the identifier of the artifact.- Specified by:
getArtifactIdin interfaceArtifact- Returns:
- the identifier of the artifact
- See Also:
-
setArtifactId
-
getClassifier
Description copied from interface:ArtifactReturns the classifier of the artifact.- Specified by:
getClassifierin interfaceArtifact- Returns:
- the classifier or an empty string if none, never
null - See Also:
-
setClassifier
-
getVersion
Description copied from interface:ArtifactReturns the version of the artifact. Contrarily toArtifactCoordinates, eachArtifactis associated to a specific version instead of a range of versions. If the base version contains a meta-version such asSNAPSHOT, those keywords are replaced by, for example, the actual timestamp.- Specified by:
getVersionin interfaceArtifact- Returns:
- the version of the artifact
- See Also:
-
setVersion
-
getBaseVersion
Description copied from interface:ArtifactReturns the version or meta-version of the artifact. A meta-version is a version suffixed with theSNAPSHOTkeyword. Meta-versions are represented in a base version by their symbols (e.g.,SNAPSHOT), while they are replaced by, for example, the actual timestamp in the version.- Specified by:
getBaseVersionin interfaceArtifact- Returns:
- the version or meta-version of the artifact
-
setBaseVersion
-
getExtension
Description copied from interface:ArtifactReturns the file extension of the artifact. The dot separator is not included in the returned string.- Specified by:
getExtensionin interfaceArtifact- Returns:
- the file extension or an empty string if none, never
null - See Also:
-
setExtension
-
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:
-
toCoordinates
Description copied from interface:ArtifactReturns coordinates with the same identifiers as this artifact. This is a shortcut forsession.createArtifactCoordinates(artifact).- Specified by:
toCoordinatesin interfaceArtifact- Returns:
- coordinates with the same identifiers as this artifact
- See Also:
-
toString
-
equals
-
hashCode
-