From 6bb91959fcd68975f0b29d24d3f51e27291486ab Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Thu, 13 Oct 2022 19:00:30 +0200 Subject: [PATCH] Ensure Jitpack compatibility By default Jitpack builds with Java 11.0.2 and Maven 3.6.1. Additionally, its read-only `/script/toolchains.xml` file points to at least one nonexistent JDK home directory. See jitpack/jitpack.io#5795. These days Error Prone releases are built using JDK 17 and require at least Maven 3.6.3. Additionally, its `maven-toolchains-plugin` configuration rejects invalid `toolchains.xml` configurations. As such this change uses SDKMAN! to configure recent Java and Maven versions, and modifies the build by disabling Maven Toolchains usage. --- jitpack.yml | 8 ++++++++ pom.xml | 20 -------------------- 2 files changed, 8 insertions(+), 20 deletions(-) create mode 100644 jitpack.yml diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 00000000000..6b3e99122b7 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,8 @@ +before_install: + - mvn -version + - source "${HOME}/.sdkman/bin/sdkman-init.sh" + - sdk update + - sdk install java 17.0.12-tem + - sdk use java 17.0.12-tem + - sdk install maven 3.9.9 + - sdk use maven 3.9.9 diff --git a/pom.xml b/pom.xml index a16203b076d..c02f46b992b 100644 --- a/pom.xml +++ b/pom.xml @@ -246,19 +246,6 @@ maven-surefire-plugin 3.1.0 - - - ${java.specification.version} - -Xmx1g --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED @@ -289,13 +276,6 @@ - - - - toolchain - - -