From d2069e03e2dff02df8a80ecbb03efb9f5da697d5 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 29 Mar 2022 20:25:17 -0700 Subject: [PATCH] EOL `java.level` --- README.md | 7 ++-- pom.xml | 35 ++++++------------- src/it/benchmark/pom.xml | 1 - src/it/beta-fail/pom.xml | 1 - src/it/beta-just-testing/pom.xml | 1 - src/it/beta-pass/pom.xml | 1 - src/it/incrementals-and-plugin-bom/pom.xml | 1 - src/it/localizer/pom.xml | 1 - src/it/sample-plugin/pom.xml | 1 - .../undefined-java-level/invoker.properties | 2 -- src/it/undefined-java-level/pom.xml | 30 ---------------- src/it/undefined-java-level/postbuild.groovy | 3 -- .../src/main/java/test/X.java | 3 -- .../src/main/resources/index.jelly | 2 -- 14 files changed, 13 insertions(+), 76 deletions(-) delete mode 100644 src/it/undefined-java-level/invoker.properties delete mode 100644 src/it/undefined-java-level/pom.xml delete mode 100644 src/it/undefined-java-level/postbuild.groovy delete mode 100644 src/it/undefined-java-level/src/main/java/test/X.java delete mode 100644 src/it/undefined-java-level/src/main/resources/index.jelly diff --git a/README.md b/README.md index 1011ce0d28..8fe7b74602 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ The main changes are: * Reduced number of overridable properties. All references (e.g. dependencies and plugin versions) not thought to be overridden are no longer based on properties. The main remaining overridable properties are: * `jenkins.version`: The Jenkins version required by the plugin. **Mandatory.** - * `java.level`: The Java version to use to build the plugin. **Mandatory.** Should match the minimum Java version for the selected Jenkins version. See [Java Support](#java-support) for more info. * `jenkins-test-harness.version`: The [JTH version](https://github.com/jenkinsci/jenkins-test-harness/releases) used to test plugin. Uses split test-harness (see [JENKINS-32478](https://issues.jenkins-ci.org/browse/JENKINS-32478)). @@ -46,7 +45,6 @@ In order to use the new POM: ```xml 2.303.1 - 8 ``` @@ -58,10 +56,9 @@ If you had a `jar:test-jar` execution, delete it and add to `properties`: ## Java support -The plugin POM is designed for plugin builds with JDK 8 or above, -but target `java.level` for a plugin may differ from a JDK version used for the build. +The plugin POM is designed for plugin builds with JDK 8 or above. Starting from Plugin POM `3.44`, support of Java 7 targets in Plugin POM is deprecated and has been removed in `4.0`, -`java.level=8` and `jenkins.version>2.249.1` are expected to be used for most plugins. +`jenkins.version>2.249.1` is expected to be used for most plugins. ## Incrementals diff --git a/pom.xml b/pom.xml index 48d3eefaf9..f76d68a649 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,6 @@ 3.26 1.17 - you-must-override-the-java.level-property - 1.${java.level} + 1.8 test @@ -552,7 +551,7 @@ - (or just override java.level) --> + --> @@ -699,10 +698,10 @@ maven-compiler-plugin - 1.${java.level} - 1.${java.level} - 1.${java.level} - 1.${java.level} + 1.8 + 1.8 + 1.8 + 1.8 - ${basedir}/src/it/undefined-java-level/pom.xml - - - - 8 - - jdk-above-9 @@ -968,8 +955,8 @@ maven-compiler-plugin - ${java.level} - ${java.level} + 8 + 8 diff --git a/src/it/benchmark/pom.xml b/src/it/benchmark/pom.xml index 6b3c9a4e86..d57c4ed650 100644 --- a/src/it/benchmark/pom.xml +++ b/src/it/benchmark/pom.xml @@ -14,7 +14,6 @@ jar 2.249 - 8 diff --git a/src/it/beta-fail/pom.xml b/src/it/beta-fail/pom.xml index 5da00940a0..a717e3df0f 100644 --- a/src/it/beta-fail/pom.xml +++ b/src/it/beta-fail/pom.xml @@ -14,7 +14,6 @@ pom 2.277.4 - 8 true diff --git a/src/it/beta-just-testing/pom.xml b/src/it/beta-just-testing/pom.xml index ed792d7c98..d227e8e0db 100644 --- a/src/it/beta-just-testing/pom.xml +++ b/src/it/beta-just-testing/pom.xml @@ -14,7 +14,6 @@ pom 2.277.4 - 8 true diff --git a/src/it/beta-pass/pom.xml b/src/it/beta-pass/pom.xml index 69b3854de9..ca71cc86ec 100644 --- a/src/it/beta-pass/pom.xml +++ b/src/it/beta-pass/pom.xml @@ -14,7 +14,6 @@ pom 2.277.4 - 8 true diff --git a/src/it/incrementals-and-plugin-bom/pom.xml b/src/it/incrementals-and-plugin-bom/pom.xml index bb2a61e025..d0059d0bb3 100644 --- a/src/it/incrementals-and-plugin-bom/pom.xml +++ b/src/it/incrementals-and-plugin-bom/pom.xml @@ -15,7 +15,6 @@ 1.0 -SNAPSHOT 2.249 - 8 diff --git a/src/it/localizer/pom.xml b/src/it/localizer/pom.xml index fedf5ca4f9..b4c4a89dbc 100644 --- a/src/it/localizer/pom.xml +++ b/src/it/localizer/pom.xml @@ -14,7 +14,6 @@ hpi 2.277.4 - 8 true diff --git a/src/it/sample-plugin/pom.xml b/src/it/sample-plugin/pom.xml index 4f0ebfff95..fe1f63f273 100644 --- a/src/it/sample-plugin/pom.xml +++ b/src/it/sample-plugin/pom.xml @@ -14,7 +14,6 @@ hpi 2.249 - 8 diff --git a/src/it/undefined-java-level/invoker.properties b/src/it/undefined-java-level/invoker.properties deleted file mode 100644 index 2c033519e7..0000000000 --- a/src/it/undefined-java-level/invoker.properties +++ /dev/null @@ -1,2 +0,0 @@ -invoker.goals=-Dstyle.color=always -ntp clean install -invoker.buildResult=failure diff --git a/src/it/undefined-java-level/pom.xml b/src/it/undefined-java-level/pom.xml deleted file mode 100644 index e4d8f20ff5..0000000000 --- a/src/it/undefined-java-level/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - org.jenkins-ci.plugins - plugin - @project.version@ - - - org.jenkins-ci.plugins.its - undefined-java-level - 1.0-SNAPSHOT - hpi - - 2.249 - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - diff --git a/src/it/undefined-java-level/postbuild.groovy b/src/it/undefined-java-level/postbuild.groovy deleted file mode 100644 index 68c1448db5..0000000000 --- a/src/it/undefined-java-level/postbuild.groovy +++ /dev/null @@ -1,3 +0,0 @@ -assert new File(basedir, 'build.log').text.replaceAll(/\e\[[\d;]*[^\d;]/, '').contains('java.lang.IllegalArgumentException: Unknown JDK version given. Should be something like "1.7"') - -return true diff --git a/src/it/undefined-java-level/src/main/java/test/X.java b/src/it/undefined-java-level/src/main/java/test/X.java deleted file mode 100644 index 2787e6f02e..0000000000 --- a/src/it/undefined-java-level/src/main/java/test/X.java +++ /dev/null @@ -1,3 +0,0 @@ -package test; - -public class X {} diff --git a/src/it/undefined-java-level/src/main/resources/index.jelly b/src/it/undefined-java-level/src/main/resources/index.jelly deleted file mode 100644 index 2f655e510a..0000000000 --- a/src/it/undefined-java-level/src/main/resources/index.jelly +++ /dev/null @@ -1,2 +0,0 @@ - -