From 3d0120b4a91877d803f1f22bb3aea861f36377f4 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Wed, 20 Sep 2023 07:45:40 -0500 Subject: [PATCH] Support up to Java 21 --- README.adoc | 4 + pom.xml | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 245 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index cfa7547..7ac50e5 100644 --- a/README.adoc +++ b/README.adoc @@ -44,6 +44,8 @@ In order to do so, it is expected that the following system property or properti * `java17.home`: this property must be set to the location of a Java 17 JDK installation * `java18.home`: this property must be set to the location of a Java 18 JDK installation * `java19.home`: this property must be set to the location of a Java 19 JDK installation +* `java20.home`: this property must be set to the location of a Java 20 JDK installation +* `java21.home`: this property must be set to the location of a Java 21 JDK installation In order to simplify development, it is recommended to project maintainers to set these properties in your personal Maven `settings.xml` file. @@ -163,5 +165,7 @@ Note that this configuration causes the default `JAVA_HOME` environment to be se |build-test-java17|Run tests for Java 17 when `java17.home` is set and JDK 18 or later is used.|<> |build-test-java18|Run tests for Java 18 when `java18.home` is set and JDK 19 or later is used.|<> |build-test-java19|Run tests for Java 19 when `java19.home` is set and JDK 20 or later is used.|<> +|build-test-java20|Run tests for Java 20 when `java20.home` is set and JDK 21 or later is used.|<> +|build-test-java21|Run tests for Java 21 when `java21.home` is set and JDK 22 or later is used.|<> |=== diff --git a/pom.xml b/pom.xml index eea287b..c6c7974 100644 --- a/pom.xml +++ b/pom.xml @@ -772,7 +772,7 @@ - + java19-mr-build @@ -816,6 +816,246 @@ + + + + + + + + java20-test-classpath + + [20,20) + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + default-test + + ${project.build.outputDirectory}/META-INF/versions/20 + + ${project.build.outputDirectory}/META-INF/versions/19 + ${project.build.outputDirectory}/META-INF/versions/18 + ${project.build.outputDirectory}/META-INF/versions/17 + ${project.build.outputDirectory} + + + + + + + + + + + + java19-test + + [20,) + + java19.home + + + ${basedir}/build-test-java19 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + java19-test + test + + test + + + ${java19.home}/bin/java + ${project.build.outputDirectory}/META-INF/versions/19 + + ${project.build.outputDirectory}/META-INF/versions/18 + ${project.build.outputDirectory}/META-INF/versions/17 + ${project.build.outputDirectory} + + + + + + + + + + + + java20-mr-build + + [20,) + + ${basedir}/src/main/java20 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + compile-java20 + compile + + compile + + + 20 + + ${project.basedir}/src/main/java20 + + true + + + + + + maven-jar-plugin + + + + true + + + + + + + + + + + + + + + java21-test-classpath + + [21,21) + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + default-test + + ${project.build.outputDirectory}/META-INF/versions/21 + + ${project.build.outputDirectory}/META-INF/versions/20 + ${project.build.outputDirectory}/META-INF/versions/19 + ${project.build.outputDirectory}/META-INF/versions/18 + ${project.build.outputDirectory}/META-INF/versions/17 + ${project.build.outputDirectory} + + + + + + + + + + + + java20-test + + [21,) + + java20.home + + + ${basedir}/build-test-java20 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + java20-test + test + + test + + + ${java20.home}/bin/java + ${project.build.outputDirectory}/META-INF/versions/20 + + ${project.build.outputDirectory}/META-INF/versions/19 + ${project.build.outputDirectory}/META-INF/versions/18 + ${project.build.outputDirectory}/META-INF/versions/17 + ${project.build.outputDirectory} + + + + + + + + + + + + java21-mr-build + + [21,) + + ${basedir}/src/main/java21 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + compile-java21 + compile + + compile + + + 21 + + ${project.basedir}/src/main/java21 + + true + + + + + + maven-jar-plugin + + + + true + + + + + + +