public void visit ( DependencyNode node , boolean collecting ) { if ( collecting ) { dependencies . add ( node . getArtifact ( ) ) ; } if ( matchesTarget ( node . getArtifact ( ) ) ) { collecting = true ; log . debug ( "Found target. Collecting dependencies after " + node . getArtifact ( ) ) ; } for ( final DependencyNode child : node . getChildren ( ) ) { visit ( child , collecting ) ; } }
Visits all nodes from the given node and collects dependencies .