File tree Expand file tree Collapse file tree
java-cloud-bom/tests/src/test/java/com/google/cloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ private void checkBom(Path bomPath) throws Exception {
7373 Bom bom = Bom .readBom (bomPath );
7474 List <Artifact > artifacts = bom .getManagedDependencies ();
7575 for (Artifact artifact : artifacts ) {
76+ if (artifact .getVersion ().contains ("SNAPSHOT" )) {
77+ continue ;
78+ }
7679 assertReachable (buildMavenCentralUrl (artifact ));
7780 }
7881
@@ -98,6 +101,9 @@ static void checkBomReachable(Path bomPath) throws Exception {
98101
99102 StringBuilder errors = new StringBuilder ();
100103 for (Artifact artifact : artifacts ) {
104+ if (artifact .getVersion ().contains ("SNAPSHOT" )) {
105+ continue ;
106+ }
101107 try {
102108 assertReachable (buildMavenCentralUrl (artifact ));
103109 } catch (IOException ex ) {
Original file line number Diff line number Diff line change 2323import com .google .cloud .tools .opensource .classpath .LinkageChecker ;
2424import com .google .cloud .tools .opensource .classpath .LinkageProblem ;
2525import com .google .cloud .tools .opensource .dependencies .Bom ;
26+ import com .google .cloud .tools .opensource .dependencies .DependencyGraphBuilder ;
2627import com .google .cloud .tools .opensource .dependencies .MavenRepositoryException ;
2728import com .google .cloud .tools .opensource .dependencies .RepositoryUtility ;
2829import com .google .cloud .tools .opensource .dependencies .UnresolvableArtifactProblem ;
@@ -82,7 +83,12 @@ public void testForNewLinkageErrors()
8283 private LinkageChecker createLinkageChecker (Bom bom )
8384 throws InvalidVersionSpecificationException , IOException {
8485 ImmutableList <Artifact > managedDependencies = bom .getManagedDependencies ();
85- ClassPathBuilder classPathBuilder = new ClassPathBuilder ();
86+ DependencyGraphBuilder graphBuilder =
87+ new DependencyGraphBuilder (
88+ ImmutableList .of (
89+ "https://repo1.maven.org/maven2/" ,
90+ "https://google.oss.sonatype.org/content/repositories/snapshots/" ));
91+ ClassPathBuilder classPathBuilder = new ClassPathBuilder (graphBuilder );
8692
8793 // full: false to avoid fetching optional dependencies.
8894 ClassPathResult classPathResult =
You can’t perform that action at this time.
0 commit comments