/** * 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. * * @param artifact the attached artifact for the new dependency node * @return the new dependency node */ // package protected for unit test DependencyNode addNode( Artifact artifact ) { DependencyNode node = createNode( artifact ); DependencyNode previousNode = nodesByArtifact.put( node.getArtifact(), node ); if ( previousNode != null ) { throw new IllegalStateException( "Duplicate node registered for artifact: " + node.getArtifact() ); } if ( rootNode == null ) { rootNode = node; } currentNode = node; return node; }
/** * 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. * * @param artifact * the attached artifact for the new dependency node * @return the new dependency node */ // package protected for unit test DependencyNode addNode( Artifact artifact ) { DependencyNode node = createNode( artifact ); DependencyNode previousNode = ( DependencyNode ) nodesByArtifact.put( node.getArtifact(), node ); if ( previousNode != null ) { throw new IllegalStateException( "Duplicate node registered for artifact: " + node.getArtifact() ); } if ( rootNode == null ) { rootNode = node; } currentNode = node; return node; }
/** * {@inheritDoc} */ public void omitForCycle( Artifact artifact ) { log( "omitForCycle: artifact=" + artifact ); if ( isCurrentNodeIncluded() ) { DependencyNode node = createNode( artifact ); node.omitForCycle(); } }
/** * {@inheritDoc} */ public void omitForCycle( Artifact artifact ) { log( "omitForCycle: artifact=" + artifact ); if ( isCurrentNodeIncluded() ) { DependencyNode node = createNode( artifact ); node.omitForCycle(); } }
omittedNode = createNode( omitted );
omittedNode = createNode( omitted );