Skip to content

Commit 1a4cfb4

Browse files
committed
To use dependencyGraphBuilder.buildFullDependencyGraph
1 parent 640ce71 commit 1a4cfb4

29 files changed

+28
-2397
lines changed

dashboard/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
<groupId>com.google.guava</groupId>
9393
<artifactId>guava</artifactId>
9494
</dependency>
95+
<dependency>
96+
<groupId>com.google.cloud.tools</groupId>
97+
<artifactId>dependencies</artifactId>
98+
<version>1.4.3</version>
99+
</dependency>
95100

96101
<dependency>
97102
<groupId>com.google.truth.extensions</groupId>

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/ArtifactCache.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@
1616

1717
package com.google.cloud.tools.opensource.cloudbomdashboard;
1818

19+
import com.google.cloud.tools.opensource.dependencies.DependencyGraph;
1920
import java.util.List;
2021
import java.util.Map;
21-
2222
import org.eclipse.aether.artifact.Artifact;
2323

24-
import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.DependencyGraph;
25-
2624
/**
2725
* Unified return type to bundle a lot of information about multiple artifacts together.
2826
*/

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/ArtifactInfo.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616

1717
package com.google.cloud.tools.opensource.cloudbomdashboard;
1818

19+
import com.google.cloud.tools.opensource.dependencies.DependencyGraph;
1920
import org.eclipse.aether.RepositoryException;
2021

21-
import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.DependencyGraph;
22-
2322
/**
2423
* Cache of info looked up for an artifact.
2524
*/

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/ArtifactResults.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616

1717
package com.google.cloud.tools.opensource.cloudbomdashboard;
1818

19+
import com.google.cloud.tools.opensource.dependencies.Artifacts;
1920
import java.util.HashMap;
2021
import java.util.Map;
21-
2222
import javax.annotation.Nullable;
23-
2423
import org.eclipse.aether.artifact.Artifact;
2524

26-
import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.Artifacts;
27-
2825
/**
2926
* Collection of test results for a single artifact.
3027
*/

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/DashboardMain.java

+20-15
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,19 @@
1616

1717
package com.google.cloud.tools.opensource.cloudbomdashboard;
1818

19-
import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.*;
19+
import static com.google.common.base.Preconditions.checkArgument;
20+
21+
import com.google.cloud.tools.opensource.dependencies.Bom;
22+
import com.google.cloud.tools.opensource.dependencies.DependencyGraph;
23+
import com.google.cloud.tools.opensource.dependencies.DependencyGraphBuilder;
24+
import com.google.cloud.tools.opensource.dependencies.MavenRepositoryException;
25+
import com.google.cloud.tools.opensource.dependencies.RepositoryUtility;
26+
import com.google.cloud.tools.opensource.dependencies.Update;
27+
import com.google.cloud.tools.opensource.dependencies.VersionComparator;
2028
import com.google.common.annotations.VisibleForTesting;
2129
import com.google.common.base.Splitter;
2230
import com.google.common.collect.ImmutableList;
2331
import freemarker.template.*;
24-
import org.apache.commons.cli.ParseException;
25-
import org.apache.commons.io.FileUtils;
26-
import org.apache.maven.model.Model;
27-
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
28-
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
29-
import org.eclipse.aether.RepositoryException;
30-
import org.eclipse.aether.RepositorySystem;
31-
import org.eclipse.aether.artifact.Artifact;
32-
import org.eclipse.aether.artifact.DefaultArtifact;
33-
import org.eclipse.aether.graph.Dependency;
34-
3532
import java.io.*;
3633
import java.net.URISyntaxException;
3734
import java.net.URL;
@@ -44,8 +41,16 @@
4441
import java.time.LocalDateTime;
4542
import java.util.*;
4643
import java.util.Map.Entry;
47-
48-
import static com.google.common.base.Preconditions.checkArgument;
44+
import org.apache.commons.cli.ParseException;
45+
import org.apache.commons.io.FileUtils;
46+
import org.apache.maven.model.Model;
47+
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
48+
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
49+
import org.eclipse.aether.RepositoryException;
50+
import org.eclipse.aether.RepositorySystem;
51+
import org.eclipse.aether.artifact.Artifact;
52+
import org.eclipse.aether.artifact.DefaultArtifact;
53+
import org.eclipse.aether.graph.Dependency;
4954

5055
public class DashboardMain {
5156

@@ -215,7 +220,7 @@ private static ArtifactCache loadArtifactInfo(List<Artifact> artifacts) {
215220

216221
for (Artifact artifact : artifacts) {
217222
DependencyGraph completeDependencies =
218-
dependencyGraphBuilder.buildVerboseDependencyGraph(artifact);
223+
dependencyGraphBuilder.buildFullDependencyGraph(ImmutableList.of(artifact));
219224
globalDependencies.add(completeDependencies);
220225

221226
// picks versions according to Maven rules

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/dependencies/ArtifactProblem.java

-127
This file was deleted.

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/dependencies/Artifacts.java

-41
This file was deleted.

dashboard/src/main/java/com/google/cloud/tools/opensource/cloudbomdashboard/dependencies/BanOptionalDependencySelector.java

-37
This file was deleted.

0 commit comments

Comments
 (0)