Package org.apache.maven.artifact
Class DefaultArtifact
java.lang.Object
org.apache.maven.artifact.DefaultArtifact
- All Implemented Interfaces:
Comparable<Artifact>
,Artifact
- Author:
- Jason van Zyl
-
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
ConstructorDescriptionDefaultArtifact
(String groupId, String artifactId, String version, String scope, String type, String classifier, ArtifactHandler artifactHandler) DefaultArtifact
(String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler) DefaultArtifact
(String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler, boolean optional) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadata
(ArtifactMetadata metadata) int
boolean
protected String
getFile()
getId()
getScope()
getType()
boolean
int
hashCode()
boolean
boolean
boolean
boolean
boolean
void
selectVersion
(String version) void
setArtifactHandler
(ArtifactHandler artifactHandler) void
setArtifactId
(String artifactId) void
setAvailableVersions
(List<ArtifactVersion> availableVersions) void
setBaseVersion
(String baseVersion) protected void
setBaseVersionInternal
(String baseVersion) void
setDependencyFilter
(ArtifactFilter artifactFilter) void
setDependencyTrail
(List<String> dependencyTrail) void
setDownloadUrl
(String downloadUrl) void
void
setGroupId
(String groupId) void
setOptional
(boolean optional) void
setRelease
(boolean release) void
setRepository
(ArtifactRepository repository) void
setResolved
(boolean resolved) void
setResolvedVersion
(String version) void
void
setVersion
(String version) void
setVersionRange
(VersionRange versionRange) toString()
void
updateVersion
(String version, ArtifactRepository localRepository)
-
Constructor Details
-
DefaultArtifact
-
DefaultArtifact
public DefaultArtifact(String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler) -
DefaultArtifact
public DefaultArtifact(String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler, boolean optional)
-
-
Method Details
-
getClassifier
- Specified by:
getClassifier
in interfaceArtifact
-
hasClassifier
public boolean hasClassifier()- Specified by:
hasClassifier
in interfaceArtifact
-
getScope
-
getGroupId
- Specified by:
getGroupId
in interfaceArtifact
-
getArtifactId
- Specified by:
getArtifactId
in interfaceArtifact
-
getVersion
- Specified by:
getVersion
in interfaceArtifact
-
setVersion
- Specified by:
setVersion
in interfaceArtifact
-
getType
-
setFile
-
getFile
-
getRepository
- Specified by:
getRepository
in interfaceArtifact
-
setRepository
- Specified by:
setRepository
in interfaceArtifact
-
getId
-
getDependencyConflictId
- Specified by:
getDependencyConflictId
in interfaceArtifact
-
addMetadata
- Specified by:
addMetadata
in interfaceArtifact
-
getMetadataList
- Specified by:
getMetadataList
in interfaceArtifact
-
toString
-
equals
-
hashCode
public int hashCode() -
getBaseVersion
- Specified by:
getBaseVersion
in interfaceArtifact
-
getBaseVersionInternal
-
setBaseVersion
- Specified by:
setBaseVersion
in interfaceArtifact
-
setBaseVersionInternal
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Artifact>
-
updateVersion
- Specified by:
updateVersion
in interfaceArtifact
-
getDownloadUrl
- Specified by:
getDownloadUrl
in interfaceArtifact
-
setDownloadUrl
- Specified by:
setDownloadUrl
in interfaceArtifact
-
getDependencyFilter
- Specified by:
getDependencyFilter
in interfaceArtifact
-
setDependencyFilter
- Specified by:
setDependencyFilter
in interfaceArtifact
-
getArtifactHandler
- Specified by:
getArtifactHandler
in interfaceArtifact
-
getDependencyTrail
- Specified by:
getDependencyTrail
in interfaceArtifact
-
setDependencyTrail
- Specified by:
setDependencyTrail
in interfaceArtifact
-
setScope
-
getVersionRange
- Specified by:
getVersionRange
in interfaceArtifact
-
setVersionRange
- Specified by:
setVersionRange
in interfaceArtifact
-
selectVersion
- Specified by:
selectVersion
in interfaceArtifact
-
setGroupId
- Specified by:
setGroupId
in interfaceArtifact
-
setArtifactId
- Specified by:
setArtifactId
in interfaceArtifact
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshot
in interfaceArtifact
-
setResolved
public void setResolved(boolean resolved) - Specified by:
setResolved
in interfaceArtifact
-
isResolved
public boolean isResolved()- Specified by:
isResolved
in interfaceArtifact
-
setResolvedVersion
- Specified by:
setResolvedVersion
in interfaceArtifact
-
setArtifactHandler
- Specified by:
setArtifactHandler
in interfaceArtifact
-
setRelease
public void setRelease(boolean release) - Specified by:
setRelease
in interfaceArtifact
-
isRelease
public boolean isRelease() -
getAvailableVersions
- Specified by:
getAvailableVersions
in interfaceArtifact
-
setAvailableVersions
- Specified by:
setAvailableVersions
in interfaceArtifact
-
isOptional
public boolean isOptional()- Specified by:
isOptional
in interfaceArtifact
-
getSelectedVersion
- Specified by:
getSelectedVersion
in interfaceArtifact
- Throws:
OverConstrainedVersionException
-
isSelectedVersionKnown
- Specified by:
isSelectedVersionKnown
in interfaceArtifact
- Throws:
OverConstrainedVersionException
-
setOptional
public void setOptional(boolean optional) - Specified by:
setOptional
in interfaceArtifact
-