Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: use dependencyGraphBuilder.buildFullDependencyGraph #748

Merged
merged 6 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dashboard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>dependencies</artifactId>
<version>1.4.3</version>
</dependency>

<dependency>
<groupId>com.google.truth.extensions</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

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

import com.google.cloud.tools.opensource.dependencies.DependencyGraph;
import java.util.List;
import java.util.Map;

import org.eclipse.aether.artifact.Artifact;

import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.DependencyGraph;

/**
* Unified return type to bundle a lot of information about multiple artifacts together.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

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

import com.google.cloud.tools.opensource.dependencies.DependencyGraph;
import org.eclipse.aether.RepositoryException;

import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.DependencyGraph;

/**
* Cache of info looked up for an artifact.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@

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

import com.google.cloud.tools.opensource.dependencies.Artifacts;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Nullable;

import org.eclipse.aether.artifact.Artifact;

import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.Artifacts;

/**
* Collection of test results for a single artifact.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@

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

import com.google.cloud.tools.opensource.cloudbomdashboard.dependencies.*;
import static com.google.common.base.Preconditions.checkArgument;

import com.google.cloud.tools.opensource.dependencies.Bom;
import com.google.cloud.tools.opensource.dependencies.DependencyGraph;
import com.google.cloud.tools.opensource.dependencies.DependencyGraphBuilder;
import com.google.cloud.tools.opensource.dependencies.MavenRepositoryException;
import com.google.cloud.tools.opensource.dependencies.RepositoryUtility;
import com.google.cloud.tools.opensource.dependencies.Update;
import com.google.cloud.tools.opensource.dependencies.VersionComparator;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
import freemarker.template.*;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import org.eclipse.aether.RepositoryException;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.graph.Dependency;

import java.io.*;
import java.net.URISyntaxException;
import java.net.URL;
Expand All @@ -44,8 +41,16 @@
import java.time.LocalDateTime;
import java.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't be using wildcard imports

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

import java.util.Map.Entry;

import static com.google.common.base.Preconditions.checkArgument;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import org.eclipse.aether.RepositoryException;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.graph.Dependency;

public class DashboardMain {

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

for (Artifact artifact : artifacts) {
DependencyGraph completeDependencies =
dependencyGraphBuilder.buildVerboseDependencyGraph(artifact);
dependencyGraphBuilder.buildFullDependencyGraph(ImmutableList.of(artifact));
globalDependencies.add(completeDependencies);

// picks versions according to Maven rules
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading