diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java b/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java index f06d2437ff..832745b346 100644 --- a/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java +++ b/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java @@ -74,7 +74,7 @@ private static Set getManagedDependenciesFromBom(Bom bom) throws InvalidVersionSpecificationException { Set res = new HashSet<>(); new ClassPathBuilder() - .resolve(bom.getManagedDependencies(), true, DependencyMediation.MAVEN) + .resolve(bom.getManagedDependencies(), false, DependencyMediation.MAVEN) .getClassPath() .forEach( classPath -> { diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java b/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java index e95544d37f..384db40e0b 100644 --- a/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java +++ b/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java @@ -13,7 +13,7 @@ public class UnmanagedDependencyCheckTest { @Test public void getUnmanagedDependencyFromSamePomTest() throws MavenRepositoryException, InvalidVersionSpecificationException { - String sharedDependenciesBom = "src/test/resources/shared-dependency-3.18.0-pom.xml"; + String sharedDependenciesBom = "src/test/resources/shared-dependency-pom.xml"; List unManagedDependencies = UnmanagedDependencyCheck.getUnmanagedDependencies(sharedDependenciesBom, sharedDependenciesBom); assertTrue(unManagedDependencies.isEmpty()); @@ -24,7 +24,7 @@ public void getUnmanagedDependencyFromGapicAndHandwrittenBomTest() throws MavenRepositoryException, InvalidVersionSpecificationException { List unManagedDependencies = UnmanagedDependencyCheck.getUnmanagedDependencies( - "src/test/resources/shared-dependency-3.18.0-pom.xml", + "src/test/resources/shared-dependency-pom.xml", "src/test/resources/google-internal-artifact-test-case-pom.xml"); assertTrue(unManagedDependencies.isEmpty()); } @@ -34,7 +34,7 @@ public void getUnmanagedDependencyFromNestedPomTest() throws MavenRepositoryException, InvalidVersionSpecificationException { List unManagedDependencies = UnmanagedDependencyCheck.getUnmanagedDependencies( - "src/test/resources/shared-dependency-3.18.0-pom.xml", "src/test/resources/transitive-dependency-pom.xml"); + "src/test/resources/shared-dependency-pom.xml", "src/test/resources/transitive-dependency-pom.xml"); assertThat(unManagedDependencies) .containsAtLeastElementsIn(ImmutableList.of("com.h2database:h2")); // test dependency should be ignored. diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml index 029b9f431a..f5342f5ee0 100644 --- a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml +++ b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml @@ -36,7 +36,7 @@ com.google.cloud google-cloud-datastore-bom - 2.17.4 + 2.18.1 import pom @@ -44,21 +44,21 @@ com.google.cloud google-cloud-firestore-bom - 3.15.2 + 3.16.0 import pom com.google.cloud google-cloud-bigtable-bom - 2.29.0 + 2.31.0 import pom com.google.cloud gapic-libraries-bom - 1.23.0 + 1.27.0 import pom diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/local-install.sh b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/local-install.sh index 09f0c77931..1e1c0aab36 100755 --- a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/local-install.sh +++ b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/local-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -mvn install -f shared-dependency-3.18.0-pom.xml +mvn install -f shared-dependency-pom.xml mvn install -f gax-example-pom.xml mvn install -f nested-dependency-pom.xml mvn install -f transitive-dependency-pom.xml diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/shared-dependency-3.18.0-pom.xml b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/shared-dependency-3.18.0-pom.xml deleted file mode 100644 index d716ab7738..0000000000 --- a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/shared-dependency-3.18.0-pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-shared-dependencies - pom - 3.18.0 - - first-party-dependencies - third-party-dependencies - - Google Cloud Shared Dependencies - - Shared build configuration for Google Cloud Java libraries. - - - - com.google.api - gapic-generator-java-pom-parent - 2.28.0 - ../gapic-generator-java-pom-parent - - - - UTF-8 - ${project.artifactId} - - - - - - com.google.cloud - first-party-dependencies - 3.18.0 - pom - import - - - com.google.cloud - third-party-dependencies - 3.18.0 - pom - import - - - - diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/shared-dependency-pom.xml b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/shared-dependency-pom.xml new file mode 100644 index 0000000000..325fd0df0f --- /dev/null +++ b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/shared-dependency-pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + com.example + google-cloud-shared-dependencies-test + pom + 0.0.1-SNAPSHOT + Google Cloud Shared Dependencies + + Shared build configuration for Google Cloud Java libraries in Tests. + + + + + + com.google.cloud + google-cloud-shared-dependencies + 3.22.0 + pom + import + + + +