Examples of PreorderNodeListGenerator


Examples of org.sonatype.aether.util.graph.PreorderNodeListGenerator

    }

    public List<String> getResolvedCoordinates() {
        List<String> result = new ArrayList<String>();

        PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
        node.accept( nlg );

        for ( DependencyNode node: nlg.getNodes() )
        {
            if ( node.getDependency() != null )
            {
                Artifact artifact = node.getDependency().getArtifact();
                if ( artifact.getFile() != null)
View Full Code Here

Examples of org.sonatype.aether.util.graph.PreorderNodeListGenerator

        DependencyNode root =
            pluginDependenciesResolver.resolve( plugin, RepositoryUtils.toArtifact( pluginArtifact ), dependencyFilter,
                                                project.getRemotePluginRepositories(), session.getRepositorySession() );

        PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
        root.accept( nlg );

        List<Artifact> exposedPluginArtifacts = new ArrayList<Artifact>( nlg.getNodes().size() );
        RepositoryUtils.toArtifacts( exposedPluginArtifacts, Collections.singleton( root ),
                                     Collections.<String> emptyList(), null );
        for ( Iterator<Artifact> it = exposedPluginArtifacts.iterator(); it.hasNext(); )
        {
            Artifact artifact = it.next();
            if ( artifact.getFile() == null )
            {
                it.remove();
            }
        }

        List<org.sonatype.aether.artifact.Artifact> pluginArtifacts = nlg.getArtifacts( true );

        Map<String, ClassLoader> foreignImports = calcImports( project, parent, imports );

        ClassRealm pluginRealm =
            classRealmManager.createPluginRealm( plugin, parent, null, foreignImports, pluginArtifacts );
View Full Code Here

Examples of org.sonatype.aether.util.graph.PreorderNodeListGenerator

        DependencyNode node = REPOSITORY_SYSTEM.collectDependencies( session, collectRequest ).getRoot();
        DependencyRequest dependencyRequest = new DependencyRequest( node, null );

        REPOSITORY_SYSTEM.resolveDependencies( session, dependencyRequest  );

        PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
        node.accept( nlg );
        for (Artifact cur : nlg.getArtifacts(false)) {
            urls.add(artifactToUrl(cur));
        }

        System.out.println("--------------------");
        System.out.println(nlg.getClassPath());
        System.out.println("--------------------");

        return urls;
    }
View Full Code Here

Examples of org.sonatype.aether.util.graph.PreorderNodeListGenerator

        DependencyNode rootNode = repositorySystem.collectDependencies(session, collectRequest).getRoot();

        repositorySystem.resolveDependencies(session, new DependencyRequest(rootNode, null));

        PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
        rootNode.accept(nlg);

        return new AetherResult(rootNode, nlg.getFiles(), nlg.getClassPath());
    }
View Full Code Here

Examples of org.sonatype.aether.util.graph.PreorderNodeListGenerator

        DependencyNode rootNode = system.collectDependencies(session, collectRequest).getRoot();
        DependencyRequest dependencyRequest = new DependencyRequest();
        dependencyRequest.setRoot(rootNode);
        system.resolveDependencies(session, dependencyRequest);

        PreorderNodeListGenerator nlg = new PreorderNodeListGenerator();
        rootNode.accept(nlg);

        return new AetherResult(rootNode, nlg.getFiles(), nlg.getClassPath());
    }
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.