Class ArtifactStub
java.lang.Object
org.apache.maven.plugin.testing.stubs.ArtifactStub
- All Implemented Interfaces:
Comparable<org.apache.maven.artifact.Artifact>
,org.apache.maven.artifact.Artifact
Stub class for
Artifact
testing.- Author:
- jesse
-
Field Summary
Fields inherited from interface org.apache.maven.artifact.Artifact
LATEST_VERSION, RELEASE_VERSION, SCOPE_COMPILE, SCOPE_COMPILE_PLUS_RUNTIME, SCOPE_IMPORT, SCOPE_PROVIDED, SCOPE_RUNTIME, SCOPE_RUNTIME_PLUS_SYSTEM, SCOPE_SYSTEM, SCOPE_TEST, SNAPSHOT_VERSION, VERSION_FILE_PATTERN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadata
(org.apache.maven.artifact.metadata.ArtifactMetadata artifactMetadata) By default, do nothing.int
compareTo
(org.apache.maven.artifact.Artifact artifact) By default, return0
org.apache.maven.artifact.handler.ArtifactHandler
List<org.apache.maven.artifact.versioning.ArtifactVersion>
org.apache.maven.artifact.resolver.filter.ArtifactFilter
getFile()
getId()
Collection<org.apache.maven.artifact.metadata.ArtifactMetadata>
org.apache.maven.artifact.repository.ArtifactRepository
getScope()
org.apache.maven.artifact.versioning.ArtifactVersion
getType()
org.apache.maven.artifact.versioning.VersionRange
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
selectVersion
(String string) By default, do nothing.void
setArtifactHandler
(org.apache.maven.artifact.handler.ArtifactHandler artifactHandler) By default, do nothing.void
setArtifactId
(String artifactId) void
setAvailableVersions
(List<org.apache.maven.artifact.versioning.ArtifactVersion> list) By default, do nothing.void
setBaseVersion
(String string) By default, do nothing.void
setDependencyFilter
(org.apache.maven.artifact.resolver.filter.ArtifactFilter artifactFilter) By default, do nothing.void
setDependencyTrail
(List<String> list) By default, do nothing.void
setDownloadUrl
(String string) By default, do nothing.void
void
setFromAuthoritativeRepository
(boolean fromAuthoritativeRepository) void
setGroupId
(String groupId) void
setOptional
(boolean b) By default, do nothing.void
setRelease
(boolean b) By default, do nothing.void
setRepository
(org.apache.maven.artifact.repository.ArtifactRepository artifactRepository) void
setResolved
(boolean b) By default, do nothing.void
setResolvedVersion
(String string) By default, do nothing.void
void
Set a new typevoid
setVersion
(String version) void
setVersionRange
(org.apache.maven.artifact.versioning.VersionRange versionRange) By default, do nothing.toString()
void
updateVersion
(String string, org.apache.maven.artifact.repository.ArtifactRepository artifactRepository) By default, do nothing.
-
Constructor Details
-
ArtifactStub
public ArtifactStub()
-
-
Method Details
-
compareTo
public int compareTo(org.apache.maven.artifact.Artifact artifact) By default, return0
- Specified by:
compareTo
in interfaceComparable<org.apache.maven.artifact.Artifact>
- See Also:
-
getGroupId
- Specified by:
getGroupId
in interfaceorg.apache.maven.artifact.Artifact
-
getArtifactId
- Specified by:
getArtifactId
in interfaceorg.apache.maven.artifact.Artifact
-
getVersion
- Specified by:
getVersion
in interfaceorg.apache.maven.artifact.Artifact
-
setVersion
- Specified by:
setVersion
in interfaceorg.apache.maven.artifact.Artifact
-
getScope
- Specified by:
getScope
in interfaceorg.apache.maven.artifact.Artifact
-
getType
- Specified by:
getType
in interfaceorg.apache.maven.artifact.Artifact
-
setType
Set a new type- Parameters:
type
-
-
getClassifier
- Specified by:
getClassifier
in interfaceorg.apache.maven.artifact.Artifact
-
hasClassifier
public boolean hasClassifier()- Specified by:
hasClassifier
in interfaceorg.apache.maven.artifact.Artifact
-
getFile
- Specified by:
getFile
in interfaceorg.apache.maven.artifact.Artifact
-
setFile
- Specified by:
setFile
in interfaceorg.apache.maven.artifact.Artifact
-
getBaseVersion
- Specified by:
getBaseVersion
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getBaseVersion()
-
setBaseVersion
By default, do nothing.- Specified by:
setBaseVersion
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setBaseVersion(java.lang.String)
-
getId
- Specified by:
getId
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getId()
-
getDependencyConflictId
- Specified by:
getDependencyConflictId
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
groupId:artifactId:type:classifier
.- See Also:
-
Artifact.getDependencyConflictId()
-
addMetadata
public void addMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata artifactMetadata) By default, do nothing.- Specified by:
addMetadata
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.addMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata)
-
getMetadataList
- Specified by:
getMetadataList
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getMetadataList()
-
setRepository
public void setRepository(org.apache.maven.artifact.repository.ArtifactRepository artifactRepository) - Specified by:
setRepository
in interfaceorg.apache.maven.artifact.Artifact
-
getRepository
public org.apache.maven.artifact.repository.ArtifactRepository getRepository()- Specified by:
getRepository
in interfaceorg.apache.maven.artifact.Artifact
-
updateVersion
public void updateVersion(String string, org.apache.maven.artifact.repository.ArtifactRepository artifactRepository) By default, do nothing.- Specified by:
updateVersion
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.updateVersion(java.lang.String, org.apache.maven.artifact.repository.ArtifactRepository)
-
getDownloadUrl
- Specified by:
getDownloadUrl
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getDownloadUrl()
-
setDownloadUrl
By default, do nothing.- Specified by:
setDownloadUrl
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setDownloadUrl(java.lang.String)
-
getDependencyFilter
public org.apache.maven.artifact.resolver.filter.ArtifactFilter getDependencyFilter()- Specified by:
getDependencyFilter
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getDependencyFilter()
-
setDependencyFilter
public void setDependencyFilter(org.apache.maven.artifact.resolver.filter.ArtifactFilter artifactFilter) By default, do nothing.- Specified by:
setDependencyFilter
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setDependencyFilter(org.apache.maven.artifact.resolver.filter.ArtifactFilter)
-
getArtifactHandler
public org.apache.maven.artifact.handler.ArtifactHandler getArtifactHandler()- Specified by:
getArtifactHandler
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getArtifactHandler()
-
getDependencyTrail
- Specified by:
getDependencyTrail
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getDependencyTrail()
-
setDependencyTrail
By default, do nothing.- Specified by:
setDependencyTrail
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setDependencyTrail(java.util.List)
-
setScope
- Specified by:
setScope
in interfaceorg.apache.maven.artifact.Artifact
-
getVersionRange
public org.apache.maven.artifact.versioning.VersionRange getVersionRange()- Specified by:
getVersionRange
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getVersionRange()
-
setVersionRange
public void setVersionRange(org.apache.maven.artifact.versioning.VersionRange versionRange) By default, do nothing.- Specified by:
setVersionRange
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setVersionRange(org.apache.maven.artifact.versioning.VersionRange)
-
selectVersion
By default, do nothing.- Specified by:
selectVersion
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.selectVersion(java.lang.String)
-
setGroupId
- Specified by:
setGroupId
in interfaceorg.apache.maven.artifact.Artifact
-
setArtifactId
- Specified by:
setArtifactId
in interfaceorg.apache.maven.artifact.Artifact
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshot
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
false
.- See Also:
-
Artifact.isSnapshot()
-
setResolved
public void setResolved(boolean b) By default, do nothing.- Specified by:
setResolved
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setResolved(boolean)
-
isResolved
public boolean isResolved()- Specified by:
isResolved
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
false
.- See Also:
-
Artifact.isResolved()
-
setResolvedVersion
By default, do nothing.- Specified by:
setResolvedVersion
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setResolvedVersion(java.lang.String)
-
setArtifactHandler
public void setArtifactHandler(org.apache.maven.artifact.handler.ArtifactHandler artifactHandler) By default, do nothing.- Specified by:
setArtifactHandler
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setArtifactHandler(org.apache.maven.artifact.handler.ArtifactHandler)
-
isRelease
public boolean isRelease()- Specified by:
isRelease
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
false
.- See Also:
-
Artifact.isRelease()
-
setRelease
public void setRelease(boolean b) By default, do nothing.- Specified by:
setRelease
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setRelease(boolean)
-
getAvailableVersions
- Specified by:
getAvailableVersions
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- See Also:
-
Artifact.getAvailableVersions()
-
setAvailableVersions
By default, do nothing.- Specified by:
setAvailableVersions
in interfaceorg.apache.maven.artifact.Artifact
- See Also:
-
Artifact.setAvailableVersions(java.util.List)
-
isOptional
public boolean isOptional()- Specified by:
isOptional
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
false
.- See Also:
-
Artifact.isOptional()
-
setOptional
public void setOptional(boolean b) By default, do nothing.- Specified by:
setOptional
in interfaceorg.apache.maven.artifact.Artifact
- Parameters:
b
-
-
getSelectedVersion
public org.apache.maven.artifact.versioning.ArtifactVersion getSelectedVersion() throws org.apache.maven.artifact.versioning.OverConstrainedVersionException- Specified by:
getSelectedVersion
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
null
.- Throws:
org.apache.maven.artifact.versioning.OverConstrainedVersionException
- See Also:
-
Artifact.getSelectedVersion()
-
isSelectedVersionKnown
public boolean isSelectedVersionKnown() throws org.apache.maven.artifact.versioning.OverConstrainedVersionException- Specified by:
isSelectedVersionKnown
in interfaceorg.apache.maven.artifact.Artifact
- Returns:
false
.- Throws:
org.apache.maven.artifact.versioning.OverConstrainedVersionException
- See Also:
-
Artifact.isSelectedVersionKnown()
-
toString
-
isFromAuthoritativeRepository
public boolean isFromAuthoritativeRepository() -
setFromAuthoritativeRepository
public void setFromAuthoritativeRepository(boolean fromAuthoritativeRepository)
-