Package org.apache.maven.artifact
Interface Artifact
-
- All Superinterfaces:
Comparable<Artifact>
- All Known Implementing Classes:
DefaultArtifact
public interface Artifact extends Comparable<Artifact>
Maven Artifact interface. Notice that it mixes artifact definition concepts (groupId, artifactId, version) with dependency information (version range, scope).
-
-
Field Summary
Fields Modifier and Type Field Description static String
LATEST_VERSION
static String
RELEASE_VERSION
static String
SCOPE_COMPILE
static String
SCOPE_COMPILE_PLUS_RUNTIME
static String
SCOPE_IMPORT
static String
SCOPE_PROVIDED
static String
SCOPE_RUNTIME
static String
SCOPE_RUNTIME_PLUS_SYSTEM
static String
SCOPE_SYSTEM
static String
SCOPE_TEST
static String
SNAPSHOT_VERSION
static Pattern
VERSION_FILE_PATTERN
-
Method Summary
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
RELEASE_VERSION
static final String RELEASE_VERSION
- See Also:
- Constant Field Values
-
LATEST_VERSION
static final String LATEST_VERSION
- See Also:
- Constant Field Values
-
SNAPSHOT_VERSION
static final String SNAPSHOT_VERSION
- See Also:
- Constant Field Values
-
VERSION_FILE_PATTERN
static final Pattern VERSION_FILE_PATTERN
-
SCOPE_COMPILE
static final String SCOPE_COMPILE
- See Also:
- Constant Field Values
-
SCOPE_COMPILE_PLUS_RUNTIME
static final String SCOPE_COMPILE_PLUS_RUNTIME
- See Also:
- Constant Field Values
-
SCOPE_TEST
static final String SCOPE_TEST
- See Also:
- Constant Field Values
-
SCOPE_RUNTIME
static final String SCOPE_RUNTIME
- See Also:
- Constant Field Values
-
SCOPE_RUNTIME_PLUS_SYSTEM
static final String SCOPE_RUNTIME_PLUS_SYSTEM
- See Also:
- Constant Field Values
-
SCOPE_PROVIDED
static final String SCOPE_PROVIDED
- See Also:
- Constant Field Values
-
SCOPE_SYSTEM
static final String SCOPE_SYSTEM
- See Also:
- Constant Field Values
-
SCOPE_IMPORT
static final String SCOPE_IMPORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGroupId
String getGroupId()
-
getArtifactId
String getArtifactId()
-
getVersion
String getVersion()
-
setVersion
void setVersion(String version)
-
getScope
String getScope()
-
getType
String getType()
-
getClassifier
String getClassifier()
-
hasClassifier
boolean hasClassifier()
-
getFile
File getFile()
-
setFile
void setFile(File destination)
-
getBaseVersion
String getBaseVersion()
-
setBaseVersion
void setBaseVersion(String baseVersion)
-
getId
String getId()
-
getDependencyConflictId
String getDependencyConflictId()
-
addMetadata
void addMetadata(ArtifactMetadata metadata)
-
getMetadataList
Collection<ArtifactMetadata> getMetadataList()
-
setRepository
void setRepository(ArtifactRepository remoteRepository)
-
getRepository
ArtifactRepository getRepository()
-
updateVersion
void updateVersion(String version, ArtifactRepository localRepository)
-
getDownloadUrl
String getDownloadUrl()
-
setDownloadUrl
void setDownloadUrl(String downloadUrl)
-
getDependencyFilter
ArtifactFilter getDependencyFilter()
-
setDependencyFilter
void setDependencyFilter(ArtifactFilter artifactFilter)
-
getArtifactHandler
ArtifactHandler getArtifactHandler()
-
setScope
void setScope(String scope)
-
getVersionRange
VersionRange getVersionRange()
-
setVersionRange
void setVersionRange(VersionRange newRange)
-
selectVersion
void selectVersion(String version)
-
setGroupId
void setGroupId(String groupId)
-
setArtifactId
void setArtifactId(String artifactId)
-
isSnapshot
boolean isSnapshot()
-
setResolved
void setResolved(boolean resolved)
-
isResolved
boolean isResolved()
-
setResolvedVersion
void setResolvedVersion(String version)
-
setArtifactHandler
void setArtifactHandler(ArtifactHandler handler)
-
isRelease
boolean isRelease()
-
setRelease
void setRelease(boolean release)
-
getAvailableVersions
List<ArtifactVersion> getAvailableVersions()
-
setAvailableVersions
void setAvailableVersions(List<ArtifactVersion> versions)
-
isOptional
boolean isOptional()
-
setOptional
void setOptional(boolean optional)
-
getSelectedVersion
ArtifactVersion getSelectedVersion() throws OverConstrainedVersionException
- Throws:
OverConstrainedVersionException
-
isSelectedVersionKnown
boolean isSelectedVersionKnown() throws OverConstrainedVersionException
- Throws:
OverConstrainedVersionException
-
-