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 TypeMethodDescriptionvoid
addMetadata
(ArtifactMetadata metadata) int
boolean
getFile()
getId()
getMetadata
(Class<?> metadataClass) getScope()
Get the scope of the artifact.getType()
boolean
int
hashCode()
boolean
boolean
boolean
boolean
boolean
void
selectVersion
(String version) void
setArtifactHandler
(ArtifactHandler handler) void
setArtifactId
(String artifactId) void
setAvailableVersions
(List<ArtifactVersion> versions) void
setBaseVersion
(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 remoteRepository) void
setResolved
(boolean resolved) void
setResolvedVersion
(String version) void
void
setVersion
(String version) void
setVersionRange
(VersionRange newRange) toString()
void
updateVersion
(String version, ArtifactRepository localRepository)
-
Field Details
-
artifact
-
project
-
-
Constructor Details
-
ActiveProjectArtifact
-
-
Method Details
-
getFile
-
getGroupId
- Specified by:
getGroupId
in interfaceArtifact
-
getArtifactId
- Specified by:
getArtifactId
in interfaceArtifact
-
getVersion
- Specified by:
getVersion
in interfaceArtifact
-
setVersion
- Specified by:
setVersion
in 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:
getClassifier
in interfaceArtifact
-
hasClassifier
public boolean hasClassifier()- Specified by:
hasClassifier
in interfaceArtifact
-
setFile
-
getBaseVersion
- Specified by:
getBaseVersion
in interfaceArtifact
-
setBaseVersion
- Specified by:
setBaseVersion
in interfaceArtifact
-
getId
-
getDependencyConflictId
- Specified by:
getDependencyConflictId
in interfaceArtifact
-
addMetadata
- Specified by:
addMetadata
in interfaceArtifact
-
getMetadataList
- Specified by:
getMetadataList
in interfaceArtifact
-
setRepository
- Specified by:
setRepository
in interfaceArtifact
-
getRepository
- Specified by:
getRepository
in interfaceArtifact
-
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
- Returns:
List
<String
> with artifact ids
-
setDependencyTrail
- Specified by:
setDependencyTrail
in interfaceArtifact
- Parameters:
dependencyTrail
-List
<String
> with artifact ids
-
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
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Artifact>
-
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
-
toString
-
isRelease
public boolean isRelease() -
setRelease
public void setRelease(boolean release) - Specified by:
setRelease
in interfaceArtifact
-
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
-
hashCode
public int hashCode() -
equals
-
getMetadata
- Specified by:
getMetadata
in interfaceArtifact
-