Examples of DependencyGraphNode


Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

    public boolean evaluate( Object object )
    {
        boolean satisfies = false;
        if ( object instanceof DependencyGraphNode )
        {
            DependencyGraphNode node = (DependencyGraphNode) object;
            satisfies = node.isFromParent();
        }
        return satisfies;
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

        boolean done = false;

        while ( !done )
        {
            DependencyGraphNode node = findUnresolvedNode( graph );
            if ( node == null )
            {
                done = true;
                break;
            }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

            return;
        }

        // Find winning node.
        ArtifactReference winningArtifact = findWinningArtifact( this.foundNodesMap.values() );
        DependencyGraphNode winningNode = graph.getNode( winningArtifact );

        // Gather up Losing Nodes.
        Set losingNodes = new HashSet();
        Predicate losersPredicate = NotPredicate.getInstance( new NodeLocationPredicate( winningArtifact ) );
        CollectionUtils.select( this.foundNodesMap.values(), losersPredicate, losingNodes );

        // Swing losing nodes to winning node.
        Iterator it = losingNodes.iterator();
        while ( it.hasNext() )
        {
            NodeLocation losingNodeLoc = (NodeLocation) it.next();
            DependencyGraphNode losingNode = graph.getNode( losingNodeLoc.artifact );
            DependencyGraphUtils.collapseNodes( graph, losingNode, winningNode );
        }
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

        // Identify deps that need to be resolved.
        it = graph.getNodes().iterator();
        while ( it.hasNext() )
        {
            DependencyGraphNode node = (DependencyGraphNode) it.next();
            String key = DependencyGraphKeys.toManagementKey( node.getArtifact() );
            // This will add this node to the specified key, not replace a previous one.
            depMap.put( key, node );
        }

        // Process those depMap entries with more than 1 value.
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

        // Process for excluded edges.
        String toKey = DependencyGraphKeys.toManagementKey( artifact );
        Iterator it = this.nodePath.iterator();
        while ( it.hasNext() )
        {
            DependencyGraphNode pathNode = (DependencyGraphNode) it.next();
       
            // Process dependency declared exclusions.
            if ( pathNode.getExcludes().contains( toKey ) )
            {
                edge.setDisabled( true );
                edge.setDisabledType( DependencyGraph.DISABLED_EXCLUDED );
                String whoExcluded = DependencyGraphKeys.toKey( pathNode );
                edge.setDisabledReason( "Specifically Excluded by " + whoExcluded );
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

    }

    public void finishNode( DependencyGraphNode node )
    {
        super.finishNode( node );
        DependencyGraphNode pathNode = (DependencyGraphNode) nodePath.pop();
        if ( !node.equals( pathNode ) )
        {
            String pathNodeKey = ArtifactReference.toKey( pathNode.getArtifact() );
            String finishNodeKey = ArtifactReference.toKey( node.getArtifact() );
            throw new IllegalStateException( "Encountered bad visitor state.  Expected finish on node " + pathNodeKey
                + ", but instead got notified of node " + finishNodeKey );
        }
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

        copyEdge( edge );
    }

    public void copyEdge( DependencyGraphEdge edge )
    {
        DependencyGraphNode nodeFrom = graph.getNode( edge.getNodeFrom() );
        DependencyGraphNode nodeTo = graph.getNode( edge.getNodeTo() );

        this.copiedGraph.addNode( nodeFrom );
        this.copiedGraph.addNode( nodeTo );
        this.copiedGraph.addEdge( edge );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

    private void visitEdge( DependencyGraph graph, DependencyGraphEdge e, DependencyGraphVisitor visitor )
    {
        visitor.discoverEdge( e );

        DependencyGraphNode node = graph.getNode( e.getNodeTo() );

        if ( getNodeVisitState( node ) == UNSEEN )
        {
            setNodeVisitState( node, PROCESSING );
        }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

        {
            DependencyGraphEdge e = (DependencyGraphEdge) edges.next();

            if ( this.edgePredicate.evaluate( e ) )
            {
                DependencyGraphNode nodeTo = graph.getNode( e.getNodeTo() );
                Integer state = getNodeVisitState( nodeTo );
                if ( ( state == UNSEEN ) || ( state == PROCESSING ) )
                {
                    visitNode( graph, nodeTo, visitor );
                }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.DependencyGraphNode

    private void visitEdge( DependencyGraph graph, DependencyGraphEdge e, DependencyGraphVisitor visitor )
    {
        visitor.discoverEdge( e );

        DependencyGraphNode node = graph.getNode( e.getNodeTo() );

        if ( getNodeVisitState( node ) == UNSEEN )
        {
            visitNode( graph, node, visitor );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.