## org.apache.maven.shared.dependency.tree
Class DependencyTreeResolutionListener

    java.lang.Object
      org.apache.maven.shared.dependency.tree.DependencyTreeResolutionListener

All Implemented Interfaces:
  org.apache.maven.artifact.resolver.ResolutionListener, org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmt

    public class DependencyTreeResolutionListener

extends java.lang.Object
implements org.apache.maven.artifact.resolver.ResolutionListener, org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmt

An artifact resolution listener that constructs a dependency tree.

Version:
  $Id: DependencyTreeResolutionListener.java 661727 2008-05-30 14:21:49Z bentmann $
Author:
  Edwin Punzalan, Mark Hobson

Field Summary

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
`void` `endProcessChildren(org.apache.maven.artifact.Artifact artifact)`
`java.util.Collection` `getNodes()` Deprecated. As of 1.1, use a `CollectingDependencyNodeVisitor` on the root dependency node
`org.apache.maven.shared.dependency.tree.DependencyNode` `getRootNode()` Gets the root dependency node of the computed dependency tree.
`void` `includeArtifact(org.apache.maven.artifact.Artifact artifact)`
`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)`
`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`

Constructor Detail

### DependencyTreeResolutionListener

    public DependencyTreeResolutionListener(org.codehaus.plexus.logging.Logger logger)

  Creates a new dependency tree resolution listener that writes to the specified log.

  Parameters:
    `logger` - the log to write debug messages to

Method Detail

### testArtifact

    public void testArtifact(org.apache.maven.artifact.Artifact artifact)

  Specified by:
    `testArtifact` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### startProcessChildren

    public void startProcessChildren(org.apache.maven.artifact.Artifact artifact)

  Specified by:
    `startProcessChildren` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### endProcessChildren

    public void endProcessChildren(org.apache.maven.artifact.Artifact artifact)

  Specified by:
    `endProcessChildren` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### includeArtifact

    public void includeArtifact(org.apache.maven.artifact.Artifact artifact)

  Specified by:
    `includeArtifact` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### omitForNearer

    public void omitForNearer(org.apache.maven.artifact.Artifact omitted,
                              org.apache.maven.artifact.Artifact kept)

  Specified by:
    `omitForNearer` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### updateScope

    public void updateScope(org.apache.maven.artifact.Artifact artifact,
                            java.lang.String scope)

  Specified by:
    `updateScope` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### manageArtifact

    public void manageArtifact(org.apache.maven.artifact.Artifact artifact,
                               org.apache.maven.artifact.Artifact replacement)

  Specified by:
    `manageArtifact` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### omitForCycle

    public void omitForCycle(org.apache.maven.artifact.Artifact artifact)

  Specified by:
    `omitForCycle` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### updateScopeCurrentPom

    public void updateScopeCurrentPom(org.apache.maven.artifact.Artifact artifact,
                                      java.lang.String scopeIgnored)

  Specified by:
    `updateScopeCurrentPom` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### selectVersionFromRange

    public void selectVersionFromRange(org.apache.maven.artifact.Artifact artifact)

  Specified by:
    `selectVersionFromRange` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### restrictRange

    public void restrictRange(org.apache.maven.artifact.Artifact artifact,
                              org.apache.maven.artifact.Artifact replacement,
                              org.apache.maven.artifact.versioning.VersionRange versionRange)

  Specified by:
    `restrictRange` in interface `org.apache.maven.artifact.resolver.ResolutionListener`

### manageArtifactVersion

    public void manageArtifactVersion(org.apache.maven.artifact.Artifact artifact,
                                      org.apache.maven.artifact.Artifact replacement)

  Specified by:
    `manageArtifactVersion` in interface `org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmt`

### manageArtifactScope

    public void manageArtifactScope(org.apache.maven.artifact.Artifact artifact,
                                    org.apache.maven.artifact.Artifact replacement)

  Specified by:
    `manageArtifactScope` in interface `org.apache.maven.artifact.resolver.ResolutionListenerForDepMgmt`

### getNodes

    public java.util.Collection getNodes()

  Deprecated. As of 1.1, use a `CollectingDependencyNodeVisitor` on the root dependency node

  Gets a list of all dependency nodes in the computed dependency tree.

  Returns:
    a list of dependency nodes

### getRootNode

    public org.apache.maven.shared.dependency.tree.DependencyNode getRootNode()

  Gets the root dependency node of the computed dependency tree.

  Returns:
    the root node

Copyright © 2011. All Rights Reserved.