|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.shared.dependency.tree.DependencyTreeResolutionListener
public class DependencyTreeResolutionListener
An artifact resolution listener that constructs a dependency tree.
| Field Summary | |
|---|---|
private DependencyNode |
currentNode
The dependency node currently being processed by this listener. |
private org.codehaus.plexus.logging.Logger |
logger
The log to write debug messages to. |
private java.util.Map |
managedScopes
Map < String replacementId, String premanaged scope > |
private java.util.Map |
managedVersions
Map < String replacementId, String premanaged version > |
private java.util.Map |
nodesByArtifact
A map of dependency nodes by their attached artifact. |
private java.util.Stack |
parentNodes
The parent dependency nodes of the current dependency node. |
private DependencyNode |
rootNode
The root dependency node of the computed dependency tree. |
| Fields inherited from interface org.apache.maven.artifact.resolver.ResolutionListener |
|---|
FINISH_PROCESSING_CHILDREN, INCLUDE_ARTIFACT, MANAGE_ARTIFACT, MANAGE_ARTIFACT_SCOPE, MANAGE_ARTIFACT_VERSION, OMIT_FOR_CYCLE, OMIT_FOR_NEARER, PROCESS_CHILDREN, RESTRICT_RANGE, ROLE, SELECT_VERSION_FROM_RANGE, TEST_ARTIFACT, UPDATE_SCOPE, UPDATE_SCOPE_CURRENT_POM |
| Constructor Summary | |
|---|---|
DependencyTreeResolutionListener(org.codehaus.plexus.logging.Logger logger)
Creates a new dependency tree resolution listener that writes to the specified log. |
|
| Method Summary | |
|---|---|
(package private) DependencyNode |
addNode(org.apache.maven.artifact.Artifact artifact)
Creates a new dependency node for the specified artifact, appends it to the current parent dependency node and puts it into the dependency node cache. |
private DependencyNode |
createNode(org.apache.maven.artifact.Artifact artifact)
Creates a new dependency node for the specified artifact and appends it to the current parent dependency node. |
void |
endProcessChildren(org.apache.maven.artifact.Artifact artifact)
|
private void |
flushDependencyManagement(DependencyNode node)
Updates the specified node with any dependency management information cached in prior manageArtifact
calls. |
private DependencyNode |
getNode(org.apache.maven.artifact.Artifact artifact)
Gets the dependency node for the specified artifact from the dependency node cache. |
java.util.Collection |
getNodes()
Deprecated. As of 1.1, use a CollectingDependencyNodeVisitor on the root dependency node |
DependencyNode |
getRootNode()
Gets the root dependency node of the computed dependency tree. |
void |
includeArtifact(org.apache.maven.artifact.Artifact artifact)
|
private boolean |
isCurrentNodeIncluded()
Gets whether the all the ancestors of the dependency node currently being processed by this listener have an included state. |
private void |
log(java.lang.String message)
Writes the specified message to the log at debug level with indentation for the current node's depth. |
void |
manageArtifact(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement)
|
void |
manageArtifactScope(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement)
|
void |
manageArtifactVersion(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement)
|
void |
omitForCycle(org.apache.maven.artifact.Artifact artifact)
|
void |
omitForNearer(org.apache.maven.artifact.Artifact omitted,
org.apache.maven.artifact.Artifact kept)
|
private void |
removeNode(org.apache.maven.artifact.Artifact artifact)
Removes the dependency node for the specified artifact from the dependency node cache. |
void |
restrictRange(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement,
org.apache.maven.artifact.versioning.VersionRange versionRange)
|
void |
selectVersionFromRange(org.apache.maven.artifact.Artifact artifact)
|
void |
startProcessChildren(org.apache.maven.artifact.Artifact artifact)
|
void |
testArtifact(org.apache.maven.artifact.Artifact artifact)
|
void |
updateScope(org.apache.maven.artifact.Artifact artifact,
java.lang.String scope)
|
void |
updateScopeCurrentPom(org.apache.maven.artifact.Artifact artifact,
java.lang.String scopeIgnored)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final org.codehaus.plexus.logging.Logger logger
private final java.util.Stack parentNodes
private final java.util.Map nodesByArtifact
private DependencyNode rootNode
private DependencyNode currentNode
private java.util.Map managedVersions
private java.util.Map managedScopes
| Constructor Detail |
|---|
public DependencyTreeResolutionListener(org.codehaus.plexus.logging.Logger logger)
logger - the log to write debug messages to| Method Detail |
|---|
public void testArtifact(org.apache.maven.artifact.Artifact artifact)
testArtifact in interface org.apache.maven.artifact.resolver.ResolutionListenerpublic void startProcessChildren(org.apache.maven.artifact.Artifact artifact)
startProcessChildren in interface org.apache.maven.artifact.resolver.ResolutionListenerpublic void endProcessChildren(org.apache.maven.artifact.Artifact artifact)
endProcessChildren in interface org.apache.maven.artifact.resolver.ResolutionListenerpublic void includeArtifact(org.apache.maven.artifact.Artifact artifact)
includeArtifact in interface org.apache.maven.artifact.resolver.ResolutionListener
public void omitForNearer(org.apache.maven.artifact.Artifact omitted,
org.apache.maven.artifact.Artifact kept)
omitForNearer in interface org.apache.maven.artifact.resolver.ResolutionListener
public void updateScope(org.apache.maven.artifact.Artifact artifact,
java.lang.String scope)
updateScope in interface org.apache.maven.artifact.resolver.ResolutionListener
public void manageArtifact(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement)
manageArtifact in interface org.apache.maven.artifact.resolver.ResolutionListenerpublic void omitForCycle(org.apache.maven.artifact.Artifact artifact)
omitForCycle in interface org.apache.maven.artifact.resolver.ResolutionListener
public void updateScopeCurrentPom(org.apache.maven.artifact.Artifact artifact,
java.lang.String scopeIgnored)
updateScopeCurrentPom in interface org.apache.maven.artifact.resolver.ResolutionListenerpublic void selectVersionFromRange(org.apache.maven.artifact.Artifact artifact)
selectVersionFromRange in interface org.apache.maven.artifact.resolver.ResolutionListener
public void restrictRange(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement,
org.apache.maven.artifact.versioning.VersionRange versionRange)
restrictRange in interface org.apache.maven.artifact.resolver.ResolutionListener
public void manageArtifactVersion(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement)
manageArtifactVersion in interface org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmt
public void manageArtifactScope(org.apache.maven.artifact.Artifact artifact,
org.apache.maven.artifact.Artifact replacement)
manageArtifactScope in interface org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmtpublic java.util.Collection getNodes()
CollectingDependencyNodeVisitor on the root dependency node
public DependencyNode getRootNode()
private void log(java.lang.String message)
message - the message to write to the logprivate DependencyNode createNode(org.apache.maven.artifact.Artifact artifact)
artifact - the attached artifact for the new dependency node
DependencyNode addNode(org.apache.maven.artifact.Artifact artifact)
artifact - the attached artifact for the new dependency node
private DependencyNode getNode(org.apache.maven.artifact.Artifact artifact)
artifact - the artifact to find the dependency node for
null if the specified artifact has no corresponding dependency
nodeprivate void removeNode(org.apache.maven.artifact.Artifact artifact)
artifact - the artifact to remove the dependency node forprivate boolean isCurrentNodeIncluded()
true if all the ancestors of the current dependency node have a state of
INCLUDEDprivate void flushDependencyManagement(DependencyNode node)
manageArtifact
calls.
node - the node to update
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||