@Test public void testBuildFullDependencyGraph_multipleArtifacts() { DependencyGraph graph = dependencyGraphBuilder .buildFullDependencyGraph(Arrays.asList(datastore, guava)); List<DependencyPath> list = graph.list(); Assert.assertTrue(list.size() > 10); DependencyPath firstElement = list.get(0); Assert.assertEquals( "Level-order should pick up datastore as first element in the list", "google-cloud-datastore", firstElement.getLeaf().getArtifactId()); DependencyPath secondElement = list.get(1); Assert.assertEquals( "Level-order should pick up guava before the dependencies of the two", "guava", secondElement.getLeaf().getArtifactId()); }
public DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts) { ImmutableList<DependencyNode> dependencyNodes = artifacts.stream().map(DefaultDependencyNode::new).collect(toImmutableList()); DefaultRepositorySystemSession session = RepositoryUtility.newSessionForFullDependency(system); return buildDependencyGraph(dependencyNodes, session); }
DependencyGraphBuilder { public DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts) { ImmutableList<DependencyNode> dependencyNodes = artifacts.stream().map(DefaultDependencyNode::new).collect(toImmutableList()); DefaultRepositorySystemSession session = RepositoryUtility.newSessionForFullDependency(system); return buildDependencyGraph(dependencyNodes, session); } }
DependencyGraphBuilder { public DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts) { ImmutableList<DependencyNode> dependencyNodes = artifacts.stream().map(DefaultDependencyNode::new).collect(toImmutableList()); DefaultRepositorySystemSession session = RepositoryUtility.newSessionForFullDependency(system); return buildDependencyGraph(dependencyNodes, session); } DependencyGraphBuilder();  DependencyGraphBuilder(Iterable<String> mavenRepositoryUrls); }
DependencyGraphBuilder { public DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts) { ImmutableList<DependencyNode> dependencyNodes = artifacts.stream().map(DefaultDependencyNode::new).collect(toImmutableList()); DefaultRepositorySystemSession session = RepositoryUtility.newSessionForFullDependency(system); return buildDependencyGraph(dependencyNodes, session); } DependencyGraphBuilder();  DependencyGraphBuilder(Iterable<String> mavenRepositoryUrls); DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts); DependencyGraph buildVerboseDependencyGraph(List<Artifact> artifacts); DependencyGraph buildVerboseDependencyGraph(Artifact artifact); DependencyGraph buildMavenDependencyGraph(Dependency dependency); }
DependencyGraphBuilder { public DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts) { ImmutableList<DependencyNode> dependencyNodes = artifacts.stream().map(DefaultDependencyNode::new).collect(toImmutableList()); DefaultRepositorySystemSession session = RepositoryUtility.newSessionForFullDependency(system); return buildDependencyGraph(dependencyNodes, session); } DependencyGraphBuilder();  DependencyGraphBuilder(Iterable<String> mavenRepositoryUrls); DependencyGraph buildFullDependencyGraph(List<Artifact> artifacts); DependencyGraph buildVerboseDependencyGraph(List<Artifact> artifacts); DependencyGraph buildVerboseDependencyGraph(Artifact artifact); DependencyGraph buildMavenDependencyGraph(Dependency dependency);  }