public class DefaultArtifact extends Object implements 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 and Description |
---|
DefaultArtifact(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) |
public DefaultArtifact(String groupId, String artifactId, String version, String scope, String type, String classifier, ArtifactHandler artifactHandler)
public DefaultArtifact(String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler)
public DefaultArtifact(String groupId, String artifactId, VersionRange versionRange, String scope, String type, String classifier, ArtifactHandler artifactHandler, boolean optional)
public String getClassifier()
getClassifier
in interface Artifact
public boolean hasClassifier()
hasClassifier
in interface Artifact
public String getGroupId()
getGroupId
in interface Artifact
public String getArtifactId()
getArtifactId
in interface Artifact
public String getVersion()
getVersion
in interface Artifact
public void setVersion(String version)
setVersion
in interface Artifact
public ArtifactRepository getRepository()
getRepository
in interface Artifact
public void setRepository(ArtifactRepository repository)
setRepository
in interface Artifact
public String getDependencyConflictId()
getDependencyConflictId
in interface Artifact
public void addMetadata(ArtifactMetadata metadata)
addMetadata
in interface Artifact
public Collection<ArtifactMetadata> getMetadataList()
getMetadataList
in interface Artifact
public String getBaseVersion()
getBaseVersion
in interface Artifact
protected String getBaseVersionInternal()
public void setBaseVersion(String baseVersion)
setBaseVersion
in interface Artifact
protected void setBaseVersionInternal(String baseVersion)
public int compareTo(Artifact a)
compareTo
in interface Comparable<Artifact>
public void updateVersion(String version, ArtifactRepository localRepository)
updateVersion
in interface Artifact
public String getDownloadUrl()
getDownloadUrl
in interface Artifact
public void setDownloadUrl(String downloadUrl)
setDownloadUrl
in interface Artifact
public ArtifactFilter getDependencyFilter()
getDependencyFilter
in interface Artifact
public void setDependencyFilter(ArtifactFilter artifactFilter)
setDependencyFilter
in interface Artifact
public ArtifactHandler getArtifactHandler()
getArtifactHandler
in interface Artifact
public List<String> getDependencyTrail()
getDependencyTrail
in interface Artifact
public void setDependencyTrail(List<String> dependencyTrail)
setDependencyTrail
in interface Artifact
public VersionRange getVersionRange()
getVersionRange
in interface Artifact
public void setVersionRange(VersionRange versionRange)
setVersionRange
in interface Artifact
public void selectVersion(String version)
selectVersion
in interface Artifact
public void setGroupId(String groupId)
setGroupId
in interface Artifact
public void setArtifactId(String artifactId)
setArtifactId
in interface Artifact
public boolean isSnapshot()
isSnapshot
in interface Artifact
public void setResolved(boolean resolved)
setResolved
in interface Artifact
public boolean isResolved()
isResolved
in interface Artifact
public void setResolvedVersion(String version)
setResolvedVersion
in interface Artifact
public void setArtifactHandler(ArtifactHandler artifactHandler)
setArtifactHandler
in interface Artifact
public void setRelease(boolean release)
setRelease
in interface Artifact
public List<ArtifactVersion> getAvailableVersions()
getAvailableVersions
in interface Artifact
public void setAvailableVersions(List<ArtifactVersion> availableVersions)
setAvailableVersions
in interface Artifact
public boolean isOptional()
isOptional
in interface Artifact
public ArtifactVersion getSelectedVersion() throws OverConstrainedVersionException
getSelectedVersion
in interface Artifact
OverConstrainedVersionException
public boolean isSelectedVersionKnown() throws OverConstrainedVersionException
isSelectedVersionKnown
in interface Artifact
OverConstrainedVersionException
public void setOptional(boolean optional)
setOptional
in interface Artifact
Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.