Class ActiveProjectArtifact
java.lang.Object
org.apache.maven.project.artifact.ActiveProjectArtifact
- All Implemented Interfaces:
Comparable<Artifact>,Artifact
Wraps an active project instance to be able to receive updates from its artifact without affecting the original
attributes of this artifact.
- Version:
- $Id: ActiveProjectArtifact.java 767324 2009-04-21 22:53:49Z jdcasey $
-
Field Summary
FieldsFields inherited from interface org.apache.maven.artifact.Artifact
LATEST_VERSION, RELEASE_VERSION, SCOPE_COMPILE, SCOPE_IMPORT, SCOPE_PROVIDED, SCOPE_RUNTIME, SCOPE_SYSTEM, SCOPE_TEST, SNAPSHOT_VERSION, VERSION_FILE_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetadata(ArtifactMetadata metadata) intbooleangetFile()getId()getMetadata(Class<?> metadataClass) getScope()Get the scope of the artifact.getType()booleaninthashCode()booleanbooleanbooleanbooleanbooleanvoidselectVersion(String version) voidsetArtifactHandler(ArtifactHandler handler) voidsetArtifactId(String artifactId) voidsetAvailableVersions(List<ArtifactVersion> versions) voidsetBaseVersion(String baseVersion) voidsetDependencyFilter(ArtifactFilter artifactFilter) voidsetDependencyTrail(List<String> dependencyTrail) voidsetDownloadUrl(String downloadUrl) voidvoidsetGroupId(String groupId) voidsetOptional(boolean optional) voidsetRelease(boolean release) voidsetRepository(ArtifactRepository remoteRepository) voidsetResolved(boolean resolved) voidsetResolvedVersion(String version) voidvoidsetVersion(String version) voidsetVersionRange(VersionRange newRange) toString()voidupdateVersion(String version, ArtifactRepository localRepository)
-
Field Details
-
artifact
-
project
-
-
Constructor Details
-
ActiveProjectArtifact
-
-
Method Details
-
getFile
-
getGroupId
- Specified by:
getGroupIdin interfaceArtifact
-
getArtifactId
- Specified by:
getArtifactIdin interfaceArtifact
-
getVersion
- Specified by:
getVersionin interfaceArtifact
-
setVersion
- Specified by:
setVersionin interfaceArtifact
-
getScope
Get the scope of the artifact. If the artifact is a standalone rather than a dependency, it's scope will benull. The scope may not be the same as it was declared on the original dependency, as this is the result of combining it with the main project scope. -
getType
-
getClassifier
- Specified by:
getClassifierin interfaceArtifact
-
hasClassifier
public boolean hasClassifier()- Specified by:
hasClassifierin interfaceArtifact
-
setFile
-
getBaseVersion
- Specified by:
getBaseVersionin interfaceArtifact
-
setBaseVersion
- Specified by:
setBaseVersionin interfaceArtifact
-
getId
-
getDependencyConflictId
- Specified by:
getDependencyConflictIdin interfaceArtifact
-
addMetadata
- Specified by:
addMetadatain interfaceArtifact
-
getMetadataList
- Specified by:
getMetadataListin interfaceArtifact
-
setRepository
- Specified by:
setRepositoryin interfaceArtifact
-
getRepository
- Specified by:
getRepositoryin interfaceArtifact
-
updateVersion
- Specified by:
updateVersionin interfaceArtifact
-
getDownloadUrl
- Specified by:
getDownloadUrlin interfaceArtifact
-
setDownloadUrl
- Specified by:
setDownloadUrlin interfaceArtifact
-
getDependencyFilter
- Specified by:
getDependencyFilterin interfaceArtifact
-
setDependencyFilter
- Specified by:
setDependencyFilterin interfaceArtifact
-
getArtifactHandler
- Specified by:
getArtifactHandlerin interfaceArtifact
-
getDependencyTrail
- Specified by:
getDependencyTrailin interfaceArtifact- Returns:
List<String> with artifact ids
-
setDependencyTrail
- Specified by:
setDependencyTrailin interfaceArtifact- Parameters:
dependencyTrail-List<String> with artifact ids
-
setScope
-
getVersionRange
- Specified by:
getVersionRangein interfaceArtifact
-
setVersionRange
- Specified by:
setVersionRangein interfaceArtifact
-
selectVersion
- Specified by:
selectVersionin interfaceArtifact
-
setGroupId
- Specified by:
setGroupIdin interfaceArtifact
-
setArtifactId
- Specified by:
setArtifactIdin interfaceArtifact
-
isSnapshot
public boolean isSnapshot()- Specified by:
isSnapshotin interfaceArtifact
-
compareTo
- Specified by:
compareToin interfaceComparable<Artifact>
-
setResolved
public void setResolved(boolean resolved) - Specified by:
setResolvedin interfaceArtifact
-
isResolved
public boolean isResolved()- Specified by:
isResolvedin interfaceArtifact
-
setResolvedVersion
- Specified by:
setResolvedVersionin interfaceArtifact
-
setArtifactHandler
- Specified by:
setArtifactHandlerin interfaceArtifact
-
toString
-
isRelease
public boolean isRelease() -
setRelease
public void setRelease(boolean release) - Specified by:
setReleasein interfaceArtifact
-
getAvailableVersions
- Specified by:
getAvailableVersionsin interfaceArtifact
-
setAvailableVersions
- Specified by:
setAvailableVersionsin interfaceArtifact
-
isOptional
public boolean isOptional()- Specified by:
isOptionalin interfaceArtifact
-
getSelectedVersion
- Specified by:
getSelectedVersionin interfaceArtifact- Throws:
OverConstrainedVersionException
-
isSelectedVersionKnown
- Specified by:
isSelectedVersionKnownin interfaceArtifact- Throws:
OverConstrainedVersionException
-
setOptional
public void setOptional(boolean optional) - Specified by:
setOptionalin interfaceArtifact
-
hashCode
public int hashCode() -
equals
-
getMetadata
- Specified by:
getMetadatain interfaceArtifact
-