diff --git a/android/guava-testlib/pom.xml b/android/guava-testlib/pom.xml index 33dc15799d00..1963a08fcc65 100644 --- a/android/guava-testlib/pom.xml +++ b/android/guava-testlib/pom.xml @@ -60,6 +60,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-compiler-plugin diff --git a/android/guava-tests/pom.xml b/android/guava-tests/pom.xml index bf9bec45c651..12cf5de79bda 100644 --- a/android/guava-tests/pom.xml +++ b/android/guava-tests/pom.xml @@ -66,6 +66,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-compiler-plugin diff --git a/android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java b/android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java index bf10f5f75d14..d19299220ed4 100644 --- a/android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java +++ b/android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java @@ -78,6 +78,14 @@ public void testClassesHaveOverrides() throws Exception { * well be a JDK bug. */ || info.getName().contains("TypeTokenTest") + /* + * "IllegalAccess tried to access class + * com.google.common.collect.testing.AbstractIteratorTester from class + * com.google.common.collect.MultimapsTest" + * + * ...when we build with JDK 22 and run under JDK 8. + */ + || info.getName().contains("MultimapsTest") /* * Luckily, we don't care about analyzing tests at all. We'd skip them all if we could do so * trivially, but it's enough to skip these ones. diff --git a/android/guava/pom.xml b/android/guava/pom.xml index 501b3967264c..d69898787a66 100644 --- a/android/guava/pom.xml +++ b/android/guava/pom.xml @@ -57,6 +57,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-jar-plugin @@ -98,9 +105,6 @@ - - maven-compiler-plugin - maven-source-plugin diff --git a/android/pom.xml b/android/pom.xml index 954ae146a293..83c337af9d42 100644 --- a/android/pom.xml +++ b/android/pom.xml @@ -12,6 +12,12 @@ Parent for guava artifacts https://github.com/google/guava + + ${java.specification.version} %regex[.*.class] 1.4.4 @@ -19,7 +25,6 @@ 3.43.0 2.28.0 3.0.0 - 9+181-r4173-1 2024-01-02T00:00:00Z @@ -122,7 +127,7 @@ maven-compiler-plugin - 3.8.1 + 3.13.0 1.8 1.8 @@ -139,7 +144,32 @@ doesnotexist -XDcompilePolicy=simple - + + + + -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF -Xep:Java8ApiChecker:ERROR + + + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED @@ -157,6 +187,70 @@ true + + org.mvnsearch + toolchains-maven-plugin + 4.5.0 + + + + download-11 + + toolchain + + + + + 11 + zulu + + + + + + download-22-and-surefire-version + + toolchain + + + + + 22 + zulu + + + ${surefire.toolchain.version} + zulu + + + + + + + + maven-toolchains-plugin + 3.2.0 + + + + toolchain + + + + + + + 22 + zulu + + + + maven-jar-plugin 3.2.0 @@ -176,7 +270,7 @@ org.codehaus.plexus plexus-io - + 3.4.1 @@ -219,8 +313,13 @@ maven-javadoc-plugin - 3.5.0 + 3.8.0 + + + 11 + zulu + true true UTF-8 @@ -231,7 +330,7 @@ -Xdoclint:-html true - ${java.specification.version} + 8 ${maven-javadoc-plugin.additionalJOptions} @@ -251,8 +350,12 @@ maven-surefire-plugin - 2.7.2 + 3.3.1 + + ${surefire.toolchain.version} + zulu + ${test.include} @@ -394,90 +497,6 @@ - - javac9-for-jdk8 - - 1.8 - - - - - maven-compiler-plugin - - - - -J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar - - - - - - - - run-error-prone - - - [11,12),[16,) - - - - - maven-compiler-plugin - - - - - -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF -Xep:Java8ApiChecker:ERROR - - - -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - - - - - - javac-for-jvm18plus diff --git a/guava-gwt/pom.xml b/guava-gwt/pom.xml index 00c6421009db..afe4fa0bc461 100644 --- a/guava-gwt/pom.xml +++ b/guava-gwt/pom.xml @@ -129,6 +129,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-compiler-plugin diff --git a/guava-testlib/pom.xml b/guava-testlib/pom.xml index f60890e78e7a..6a696351e4c6 100644 --- a/guava-testlib/pom.xml +++ b/guava-testlib/pom.xml @@ -60,6 +60,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-compiler-plugin diff --git a/guava-tests/pom.xml b/guava-tests/pom.xml index 8596221d8316..f05a079b2f94 100644 --- a/guava-tests/pom.xml +++ b/guava-tests/pom.xml @@ -72,6 +72,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-compiler-plugin diff --git a/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java b/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java index bf10f5f75d14..d19299220ed4 100644 --- a/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java +++ b/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java @@ -78,6 +78,14 @@ public void testClassesHaveOverrides() throws Exception { * well be a JDK bug. */ || info.getName().contains("TypeTokenTest") + /* + * "IllegalAccess tried to access class + * com.google.common.collect.testing.AbstractIteratorTester from class + * com.google.common.collect.MultimapsTest" + * + * ...when we build with JDK 22 and run under JDK 8. + */ + || info.getName().contains("MultimapsTest") /* * Luckily, we don't care about analyzing tests at all. We'd skip them all if we could do so * trivially, but it's enough to skip these ones. diff --git a/guava/pom.xml b/guava/pom.xml index be0bab174e16..618cf9e4ddc3 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -57,6 +57,13 @@ + + org.mvnsearch + toolchains-maven-plugin + + + maven-toolchains-plugin + maven-jar-plugin @@ -98,9 +105,6 @@ - - maven-compiler-plugin - maven-source-plugin diff --git a/pom.xml b/pom.xml index 7e634f7a644e..39a5beed14ec 100644 --- a/pom.xml +++ b/pom.xml @@ -12,6 +12,12 @@ Parent for guava artifacts https://github.com/google/guava + + ${java.specification.version} %regex[.*.class] 1.4.4 @@ -19,7 +25,6 @@ 3.43.0 2.28.0 3.0.0 - 9+181-r4173-1 2024-01-02T00:00:00Z @@ -123,7 +128,7 @@ maven-compiler-plugin - 3.8.1 + 3.13.0 1.8 1.8 @@ -140,7 +145,32 @@ doesnotexist -XDcompilePolicy=simple - + + + + -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF -Xep:Java8ApiChecker:ERROR + + + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED @@ -158,6 +188,70 @@ true + + org.mvnsearch + toolchains-maven-plugin + 4.5.0 + + + + download-11 + + toolchain + + + + + 11 + zulu + + + + + + download-22-and-surefire-version + + toolchain + + + + + 22 + zulu + + + ${surefire.toolchain.version} + zulu + + + + + + + + maven-toolchains-plugin + 3.2.0 + + + + toolchain + + + + + + + 22 + zulu + + + + maven-jar-plugin 3.2.0 @@ -177,7 +271,7 @@ org.codehaus.plexus plexus-io - + 3.4.1 @@ -214,8 +308,13 @@ maven-javadoc-plugin - 3.5.0 + 3.8.0 + + + 11 + zulu + true true UTF-8 @@ -226,7 +325,7 @@ -Xdoclint:-html true - ${java.specification.version} + 8 ${maven-javadoc-plugin.additionalJOptions} @@ -246,8 +345,12 @@ maven-surefire-plugin - 2.7.2 + 3.3.1 + + ${surefire.toolchain.version} + zulu + ${test.include} @@ -389,90 +492,6 @@ - - javac9-for-jdk8 - - 1.8 - - - - - maven-compiler-plugin - - - - -J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar - - - - - - - - run-error-prone - - - [11,12),[16,) - - - - - maven-compiler-plugin - - - - - -Xplugin:ErrorProne -Xep:NullArgumentForNonNullParameter:OFF -Xep:Java8ApiChecker:ERROR - - - -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - - - - - - javac-for-jvm18plus