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

java.lang.Object
  extended by org.apache.maven.shared.dependency.tree.DependencyTreeResolutionListener
All Implemented Interfaces:
ResolutionListener, ResolutionListenerForDepMgmt

public class DependencyTreeResolutionListener
extends Object
implements ResolutionListener, ResolutionListenerForDepMgmt

An artifact resolution listener that constructs a dependency tree.

Version:
$Id: DependencyTreeResolutionListener.java 1171276 2011-09-15 21:09:18Z hboutemy $
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_SYSTEM_PATH, 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(Artifact artifact)
          
 Collection<DependencyNode> 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(Artifact artifact)
          
 void manageArtifact(Artifact artifact, Artifact replacement)
          
 void manageArtifactScope(Artifact artifact, Artifact replacement)
          
 void manageArtifactVersion(Artifact artifact, Artifact replacement)
          
 void omitForCycle(Artifact artifact)
          
 void omitForNearer(Artifact omitted, Artifact kept)
          
 void restrictRange(Artifact artifact, Artifact replacement, org.apache.maven.artifact.versioning.VersionRange versionRange)
          
 void selectVersionFromRange(Artifact artifact)
          
 void startProcessChildren(Artifact artifact)
          
 void testArtifact(Artifact artifact)
          
 void updateScope(Artifact artifact, String scope)
          
 void updateScopeCurrentPom(Artifact artifact, 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(Artifact artifact)

Specified by:
testArtifact in interface ResolutionListener

startProcessChildren

public void startProcessChildren(Artifact artifact)

Specified by:
startProcessChildren in interface ResolutionListener

endProcessChildren

public void endProcessChildren(Artifact artifact)

Specified by:
endProcessChildren in interface ResolutionListener

includeArtifact

public void includeArtifact(Artifact artifact)

Specified by:
includeArtifact in interface ResolutionListener

omitForNearer

public void omitForNearer(Artifact omitted,
                          Artifact kept)

Specified by:
omitForNearer in interface ResolutionListener

updateScope

public void updateScope(Artifact artifact,
                        String scope)

Specified by:
updateScope in interface ResolutionListener

manageArtifact

public void manageArtifact(Artifact artifact,
                           Artifact replacement)

Specified by:
manageArtifact in interface ResolutionListener

omitForCycle

public void omitForCycle(Artifact artifact)

Specified by:
omitForCycle in interface ResolutionListener

updateScopeCurrentPom

public void updateScopeCurrentPom(Artifact artifact,
                                  String scopeIgnored)

Specified by:
updateScopeCurrentPom in interface ResolutionListener

selectVersionFromRange

public void selectVersionFromRange(Artifact artifact)

Specified by:
selectVersionFromRange in interface ResolutionListener

restrictRange

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

Specified by:
restrictRange in interface ResolutionListener

manageArtifactVersion

public void manageArtifactVersion(Artifact artifact,
                                  Artifact replacement)

Specified by:
manageArtifactVersion in interface ResolutionListenerForDepMgmt

manageArtifactScope

public void manageArtifactScope(Artifact artifact,
                                Artifact replacement)

Specified by:
manageArtifactScope in interface ResolutionListenerForDepMgmt

getNodes

public Collection<DependencyNode> 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 DependencyNode getRootNode()
Gets the root dependency node of the computed dependency tree.

Returns:
the root node


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.