Examples of WalkDepthFirstSearch


Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

    implements GraphTask
{

    public void executeTask( DependencyGraph graph )
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        FlagExcludedEdgesVisitor excludedEdgeResolver = new FlagExcludedEdgesVisitor();
        walker.visit( graph, excludedEdgeResolver );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

public class ReduceEnabledEdgesTask
    implements GraphTask
{
    public void executeTask( DependencyGraph graph )
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        walker.setEdgePredicate( TruePredicate.getInstance() );
        ReduceEnabledEdgesVisitor reduceEnabledEdgesResolver = new ReduceEnabledEdgesVisitor();
        walker.visit( graph, reduceEnabledEdgesResolver );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

        this.scope = scope;
    }

    public void executeTask( DependencyGraph graph )
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        ReduceScopeVisitor reduceScopeResolver = new ReduceScopeVisitor( this.scope );
        walker.visit( graph, reduceScopeResolver );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

public class PopulateDependencyManagementTask
    implements GraphTask, PotentialCyclicEdgeProducer
{
    public void executeTask( DependencyGraph graph )
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        DependencyManagementApplier depManApplier = new DependencyManagementApplier();
        walker.visit( graph, depManApplier );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

        {
            throw new ArchivaException( "Graph is unexpectedly null." );
        }

        TreeListVisitor treeListVisitor = new TreeListVisitor();
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        walker.visit( graph, treeListVisitor );

        return treeListVisitor.getList();
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

    implements GraphTask
{
    public void executeTask( DependencyGraph graph )
        throws GraphTaskException
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        UpdateScopesVisitor updateScopes = new UpdateScopesVisitor();
        walker.visit( graph, updateScopes );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

    implements GraphTask
{

    public void executeTask( DependencyGraph graph )
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        FlagExcludedEdgesVisitor excludedEdgeResolver = new FlagExcludedEdgesVisitor();
        walker.visit( graph, excludedEdgeResolver );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

    private DependencyManagementApplier depManApplier = new DependencyManagementApplier();

    public void executeTask( DependencyGraph graph )
        throws GraphTaskException
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();

        boolean done = false;
        int maxiters = 5;

        while ( !done )
        {
            resolveGraphTask.executeTask( graph );
            walker.visit( graph, depManApplier );

            if ( !depManApplier.hasCreatedNodes() || ( maxiters < 0 ) )
            {
                done = true;
                break;
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

public class FlagExcludedEdgesTask
    implements GraphTask
{
    public void executeTask( DependencyGraph graph )
    {
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        FlagExcludedEdgesVisitor excludedEdgeResolver = new FlagExcludedEdgesVisitor();
        walker.visit( graph, excludedEdgeResolver );
    }
View Full Code Here

Examples of org.apache.maven.archiva.dependency.graph.walk.WalkDepthFirstSearch

{

    public void executeTask( DependencyGraph graph )
    {
        Iterator it;
        DependencyGraphWalker walker = new WalkDepthFirstSearch();
        RefineConflictsVisitor refineConflictsVisitor = new RefineConflictsVisitor();
       
        MultiValueMap depMap = new MultiValueMap();

        // 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.
        ToArtifactReferenceTransformer nodeToArtifact = new ToArtifactReferenceTransformer();

        it = depMap.entrySet().iterator();
        while ( it.hasNext() )
        {
            Map.Entry entry = (Entry) it.next();
            Collection nodes = (Collection) entry.getValue();
            if ( nodes.size() > 1 )
            {
                List conflictingArtifacts = new ArrayList();
                conflictingArtifacts.addAll( nodes );
                CollectionUtils.transform( conflictingArtifacts, nodeToArtifact );

                refineConflictsVisitor.resetConflictingArtifacts();
                refineConflictsVisitor.addAllConflictingArtifacts( conflictingArtifacts );
                walker.visit( graph, refineConflictsVisitor );
            }
        }
    }
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.