Examples of DependencyGraphEdge


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

    {
        boolean satisfies = false;

        if ( object instanceof DependencyGraphEdge )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) object;
            satisfies = edge.getNodeTo().equals( nodeRef );
        }

        return satisfies;
    }
View Full Code Here

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

    private DependencyGraphEdge toEdge( String fromKey, String toKey )
    {
        ArtifactReference nodeFrom = toArtifactReference( fromKey );
        ArtifactReference nodeTo = toArtifactReference( toKey );

        return new DependencyGraphEdge( nodeFrom, nodeTo );
    }
View Full Code Here

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

            return DependencyGraphKeys.toKey( ((DependencyGraphNode) input).getArtifact() );
        }

        if ( input instanceof DependencyGraphEdge )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) input;
            // Potentially Confusing, but this is called "To"KeyTransformer after all.
            return DependencyGraphKeys.toKey( edge.getNodeTo() );
        }

        if ( input instanceof ArtifactReference )
        {
            return DependencyGraphKeys.toKey( ((ArtifactReference) input) );
View Full Code Here

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

        List edgesFrom = graph.getEdgesFrom( node );
        Iterator it = edgesFrom.iterator();
        while ( it.hasNext() )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) it.next();
            Rules rules = depStack.getRules( edge );

            if ( rules == null )
            {
                // No rules for edge, skip it.
                continue;
            }

            DependencyGraphNode subnode = graph.getNode( edge.getNodeTo() );

            /* There are 3 steps to processing the DependencyManagement. */

            /* 1) Add exclusions to node ________________________________________________ */
            node.getExcludes().addAll( rules.exclusions );

            /* 2) Track version changes to node _________________________________________ */

            // This is the version as specified by the rules.
            String specifiedVersion = rules.artifact.getVersion();

            // This is the version as being tracked by the nodeVersionChanges map.
            String trackedVersion = (String) nodeVersionChanges.get( edge.getNodeTo() );

            // This is the version of the subnode.
            String nodeVersion = subnode.getArtifact().getVersion();

            // This is the actual version as determined by tracked and subnode
            String actualVersion = StringUtils.defaultString( trackedVersion, nodeVersion );

            // If the specified version changes the actual version ...
            if ( !StringUtils.equals( specifiedVersion, actualVersion ) )
            {
                // ... save this new value to be track ( for processing in #finishedGraph )
                nodeVersionChanges.put( edge.getNodeTo(), specifiedVersion );
            }

            /* 3) Update scope to edge __________________________________________________ */

            if ( StringUtils.isNotBlank( rules.scope ) )
            {
                edge.setScope( rules.scope );
            }
        }
    }
View Full Code Here

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

        List edgesFrom = currentGraph.getEdgesFrom( node );
        Iterator it = edgesFrom.iterator();
        while ( it.hasNext() )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) it.next();
            if ( this.conflictingArtifacts.contains( edge.getNodeTo() ) )
            {
                String nodeKey = DependencyGraphKeys.toKey( edge.getNodeTo() );
                // Check for existing NodeLocation with same key
                NodeLocation nodeloc = (NodeLocation) this.foundNodesMap.get( nodeKey );

                if ( ( nodeloc == null ) || ( currentDepth < nodeloc.depth ) )
                {
                    nodeloc = new NodeLocation( edge.getNodeTo(), edge, currentDepth );
                    this.foundNodesMap.put( nodeKey, nodeloc );
                }
            }
        }
    }
View Full Code Here

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

    private DependencyGraphEdge toEdge( String fromKey, String toKey )
    {
        ArtifactReference nodeFrom = toArtifactReference( fromKey );
        ArtifactReference nodeTo = toArtifactReference( toKey );

        return new DependencyGraphEdge( nodeFrom, nodeTo );
    }
View Full Code Here

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

        List edgesFrom = graph.getEdgesFrom( node );
        Iterator it = edgesFrom.iterator();
        while ( it.hasNext() )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) it.next();
            Rules rules = depStack.getRules( edge );

            if ( rules == null )
            {
                // No rules for edge, skip it.
                continue;
            }

            DependencyGraphNode subnode = graph.getNode( edge.getNodeTo() );

            /* There are 3 steps to processing the DependencyManagement. */

            /* 1) Add exclusions to node ________________________________________________ */
            node.getExcludes().addAll( rules.exclusions );

            /* 2) Track version changes to node _________________________________________ */

            // This is the version as specified by the rules.
            String specifiedVersion = rules.artifact.getVersion();

            // This is the version as being tracked by the nodeVersionChanges map.
            String trackedVersion = (String) nodeVersionChanges.get( edge.getNodeTo() );

            // This is the version of the subnode.
            String nodeVersion = subnode.getArtifact().getVersion();

            // This is the actual version as determined by tracked and subnode
            String actualVersion = StringUtils.defaultString( trackedVersion, nodeVersion );

            // If the specified version changes the actual version ...
            if ( !StringUtils.equals( specifiedVersion, actualVersion ) )
            {
                // ... save this new value to be track ( for processing in #finishedGraph )
                nodeVersionChanges.put( edge.getNodeTo(), specifiedVersion );
            }

            /* 3) Update scope to edge __________________________________________________ */

            if ( StringUtils.isNotBlank( rules.scope ) )
            {
                edge.setScope( rules.scope );
            }
        }
    }
View Full Code Here

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

    {
        boolean satisfies = false;

        if ( object instanceof DependencyGraphEdge )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) object;
            satisfies = ( edge.isDisabled() && ( edge.getDisabledType() == DependencyGraph.DISABLED_CYCLIC ) );
        }

        return satisfies;
    }
View Full Code Here

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

    {
        boolean satisfies = false;

        if ( object instanceof DependencyGraphEdge )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) object;
            satisfies = edge.getNodeFrom().equals( nodeRef );
        }

        return satisfies;
    }
View Full Code Here

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

    public void execute( Object input )
    {
        if ( input instanceof DependencyGraphEdge )
        {
            DependencyGraphEdge edge = (DependencyGraphEdge) input;
            edge.setScope( scope );
        }
    }
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.