Examples of DependencyResult


Examples of org.sonatype.aether.resolution.DependencyResult

         CollectRequest collectRequest = new CollectRequest(new org.sonatype.aether.graph.Dependency(queryArtifact,
                  null), container.getEnabledRepositoriesFromProfile(settings));

         DependencyRequest dr = new DependencyRequest(collectRequest, null);

         DependencyResult result = system.resolveDependencies(session, dr);
         DependencyNodeBuilder hierarchy = MavenConvertUtils.toDependencyNode(factory, null, result.getRoot());
         return hierarchy;
      }
      catch (Exception e)
      {
         throw new DependencyException("Could not resolve dependencies for addon [" + query.getCoordinate() + "]", e);
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

         CollectRequest collectRequest = new CollectRequest(new org.sonatype.aether.graph.Dependency(queryArtifact,
                  null), container.getEnabledRepositoriesFromProfile(settings));

         DependencyRequest dr = new DependencyRequest(collectRequest, null);

         DependencyResult result = system.resolveDependencies(session, dr);
         DependencyNodeBuilder hierarchy = MavenConvertUtils.toDependencyNode(factory, null, result.getRoot());
         return hierarchy;
      }
      catch (Exception e)
      {
         throw new DependencyException("Could not resolve dependencies for addon [" + query.getCoordinate() + "]", e);
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

         Artifact artifact = dependencyToMavenArtifact(dep);
         CollectRequest collectRequest = new CollectRequest(new org.sonatype.aether.graph.Dependency(artifact, null),
                  convertToMavenRepos(repositories));
         DependencyRequest request = new DependencyRequest(collectRequest, null);

         DependencyResult artifacts = system.resolveDependencies(session, request);

         for (ArtifactResult a : artifacts.getArtifactResults())
         {
            File file = a.getArtifact().getFile();
            Dependency d = DependencyBuilder.create().setArtifactId(a.getArtifact().getArtifactId())
                     .setGroupId(a.getArtifact().getGroupId()).setVersion(a.getArtifact().getBaseVersion())
                     .setPackagingType(a.getArtifact().getExtension());
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

         Artifact artifact = dependencyToMavenArtifact(dep);
         CollectRequest collectRequest = new CollectRequest(new org.sonatype.aether.graph.Dependency(artifact, null),
                  convertToMavenRepos(repositories));
         DependencyRequest request = new DependencyRequest(collectRequest, null);

         DependencyResult artifacts = system.resolveDependencies(session, request);

         for (ArtifactResult a : artifacts.getArtifactResults())
         {
            File file = a.getArtifact().getFile();
            Dependency d = DependencyBuilder.create().setArtifactId(a.getArtifact().getArtifactId())
                     .setGroupId(a.getArtifact().getGroupId()).setVersion(a.getArtifact().getBaseVersion())
                     .setPackagingType(a.getArtifact().getExtension());
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

            configWriter.write("\n# Auto-generated 'code' entries\n");
            for(Dependency dep : project.getDependencies())
            {
                String depString = dep.getGroupId()+":"+dep.getArtifactId()+":"+dep.getVersion();
                CollectRequest request = new CollectRequest(new org.sonatype.aether.graph.Dependency(new DefaultArtifact(depString), dep.getScope()),projectRepos);
                DependencyResult result = repoSystem.resolveDependencies(repoSession, new DependencyRequest(request, new ScopeDependencyFilter("test","provided")));

                for(ArtifactResult dependency : result.getArtifactResults())
                {
                    File d = dependency.getArtifact().getFile();
                    configWriter.write("code = code/"+d.getName() +"\n");
                    File codeFile = new File( codeDir, d.getName());
                    copyFile(d, codeFile);
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

         Artifact artifact = dependencyToMavenArtifact(dep);
         CollectRequest collectRequest = new CollectRequest(new org.sonatype.aether.graph.Dependency(artifact, null),
                  convertToMavenRepos(repositories));
         DependencyRequest request = new DependencyRequest(collectRequest, null);

         DependencyResult artifacts = system.resolveDependencies(session, request);

         for (ArtifactResult a : artifacts.getArtifactResults())
         {
            File file = a.getArtifact().getFile();
            Dependency d = DependencyBuilder.create().setArtifactId(a.getArtifact().getArtifactId())
                     .setGroupId(a.getArtifact().getGroupId()).setVersion(a.getArtifact().getVersion());
            DependencyResource resource = new DependencyResource(factory, file, d);
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

                    collectRequest.setRepositories(projectRepos);

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

                    DependencyRequest request = new DependencyRequest(rootNode,null);
                    DependencyResult result = repoSystem.resolveDependencies(session,request);


                    getLog().info("Artifact: " + aetherArtifact);
                    for(DependencyNode child : result.getRoot().getChildren()) {
                        if(child.getDependency().getArtifact().getGroupId().equals(moduleGroupId)) {
                            processModule(child);
                        }
                    }
                    processModule(result.getRoot());
                    /*
                    deps = aether.resolve(aetherArtifact, JavaScopes.RUNTIME);

                    getLog().info("Artifact: "+aetherArtifact);
                    for(Artifact dep : deps) {
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

        try {
            // collect all the dependency graph for the module, and print it until we reach a dependency to a local module
            DependencyNode rootNode = repoSystem.collectDependencies( session, collectRequest ).getRoot();

            DependencyRequest request = new DependencyRequest(rootNode,null);
            DependencyResult result = repoSystem.resolveDependencies(session,request);

            // add entry to module dependencies
            moduleLibraries.put(moduleNode.getDependency().getArtifact(), new HashSet<Artifact>());
            moduleDependencies.put(moduleNode.getDependency().getArtifact(), new HashSet<Artifact>());

            getLog().info("processing module "+moduleNode.getDependency().getArtifact().getArtifactId()+":");
            for(DependencyNode child : result.getRoot().getChildren()) {
                collectModuleDependencies(child,moduleNode.getDependency().getArtifact());
            }
            for(DependencyNode child : result.getRoot().getChildren()) {
                collectLibraryDependencies(child, moduleNode.getDependency().getArtifact());
            }

            // information output
            /*
 
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

                    collectRequest.setRepositories(projectRepos);

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

                    DependencyRequest request = new DependencyRequest(rootNode,null);
                    DependencyResult result = repoSystem.resolveDependencies(session,request);


                    getLog().info("Artifact: " + aetherArtifact);
                    for(DependencyNode child : result.getRoot().getChildren()) {
                        if(child.getDependency().getArtifact().getGroupId().equals(moduleGroupId)) {
                            processModule(child);
                        }
                    }
                    processModule(result.getRoot());
                    /*
                    deps = aether.resolve(aetherArtifact, JavaScopes.RUNTIME);

                    getLog().info("Artifact: "+aetherArtifact);
                    for(Artifact dep : deps) {
View Full Code Here

Examples of org.sonatype.aether.resolution.DependencyResult

        try {
            // collect all the dependency graph for the module, and print it until we reach a dependency to a local module
            DependencyNode rootNode = repoSystem.collectDependencies( session, collectRequest ).getRoot();

            DependencyRequest request = new DependencyRequest(rootNode,null);
            DependencyResult result = repoSystem.resolveDependencies(session,request);

            // add entry to module dependencies
            moduleLibraries.put(moduleNode.getDependency().getArtifact(), new HashSet<Artifact>());
            moduleDependencies.put(moduleNode.getDependency().getArtifact(), new HashSet<Artifact>());

            getLog().info("processing module "+moduleNode.getDependency().getArtifact().getArtifactId()+":");
            for(DependencyNode child : result.getRoot().getChildren()) {
                collectModuleDependencies(child,moduleNode.getDependency().getArtifact());
            }
            for(DependencyNode child : result.getRoot().getChildren()) {
                collectLibraryDependencies(child, moduleNode.getDependency().getArtifact());
            }

            // information output
            /*
 
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.