Examples of DependencyGraphNode


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

    {
        DependencyManagementStack stack = new DependencyManagementStack();
        Dependency dep;

        // project node, A
        DependencyGraphNode nodeA = toNode( "org.apache.maven.archiva:carlos-A:1.0::jar" );
        stack.push( nodeA );

        // sub node, B
        DependencyGraphNode nodeB = toNode( "org.apache.maven.archiva:carlos-B:1.0::jar" );
        dep = toDependency( "org.apache.maven.archiva:carlos-D:2.0::jar" );
        nodeB.addDependencyManagement( dep );
        stack.push( nodeB );

        // sub node, C
        DependencyGraphNode nodeC = toNode( "org.apache.maven.archiva:carlos-C:1.0::jar" );
        stack.push( nodeC );

        // sub node, D
        // Not added to the stack, as this is the node that is having the rules applied to it.
        DependencyGraphNode nodeD = toNode( "org.apache.maven.archiva:carlos-D:1.0::jar" );

        // Test it
        assertRules( "node D (lvl:C)", stack, nodeD, "2.0", null, null );
        stack.pop();
        assertRules( "node D (lvl:B)", stack, nodeD, "2.0", null, null );
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

        // 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

        // Using a reverse iterator to ensure that we read the
        // stack from last in to first in
        ReverseListIterator it = new ReverseListIterator( depmanStack );
        while ( it.hasNext() )
        {
            DependencyGraphNode node = (DependencyGraphNode) it.next();

            addDependencies( node.getDependencyManagement() );
        }
    }
View Full Code Here

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

        generateDepMap();
    }

    public DependencyGraphNode pop()
    {
        DependencyGraphNode node = (DependencyGraphNode) depmanStack.pop();
        generateDepMap();
        return node;
    }
View Full Code Here

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

            {
                // 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 ...
View Full Code Here

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

        toRef.setArtifactId( fromRef.getArtifactId() );
        toRef.setVersion( toVersion );
        toRef.setClassifier( fromRef.getClassifier() );
        toRef.setType( fromRef.getType() );

        DependencyGraphNode nodeFROM = graph.getNode( fromRef );
        DependencyGraphNode nodeTO = graph.getNode( toRef );

        if ( nodeTO == null )
        {
            // new node doesn't exist in graph (yet)
            nodeTO = new DependencyGraphNode( toRef );
            nodeTO.setResolved( false );

            graph.addNode( nodeTO );

            VersionedReference projectRef = new VersionedReference();
            projectRef.setGroupId( toRef.getGroupId() );
View Full Code Here

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

    {
        boolean satisfies = false;

        if ( object instanceof DependencyGraphNode )
        {
            DependencyGraphNode node = (DependencyGraphNode) object;
            satisfies = !( node.isResolved() );
        }

        return satisfies;
    }
View Full Code Here

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

    {
        boolean satisfies = false;

        if ( object instanceof DependencyGraphNode )
        {
            DependencyGraphNode node = (DependencyGraphNode) object;
            satisfies = ref.equals( node.getArtifact() );
        }

        return satisfies;
    }
View Full Code Here

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

    {
        boolean satisfies = false;

        if ( object instanceof DependencyGraphNode )
        {
            DependencyGraphNode node = (DependencyGraphNode) object;
            satisfies = CollectionUtils.isEmpty( graph.getEdgesTo( node ) );
        }

        return satisfies;
    }
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.