From 45ea5bc6a1a41e37d4eeb266d01f4ed93135db1a Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sat, 9 Dec 2023 17:39:38 +0100 Subject: [PATCH 1/3] Require JDK 17 for build - reuse javaVersion property from parent - property maven.compiler.release is set by parent for JDK 11+ - reuse checking of bytecode version from parent --- .github/workflows/maven.yml | 2 +- plexus-compiler-its/pom.xml | 2 +- .../it/MCOMPILER-346-mre/invoker.properties | 1 - .../it/aspectj-compiler/invoker.properties | 1 - .../invoker.properties | 2 +- .../error-prone-compiler/invoker.properties | 1 - .../it/missing-warnings/invoker.properties | 1 - .../invoker.properties | 1 - .../invoker.properties | 3 +- .../it/simple-javac-fork/invoker.properties | 1 - .../src/main/it/simple-javac-fork/pom.xml | 4 +-- .../main/it/simple-javac/invoker.properties | 1 - .../plexus-compiler-aspectj/pom.xml | 2 +- .../plexus-compiler-eclipse/pom.xml | 2 +- .../plexus-compiler-javac-errorprone/pom.xml | 2 +- pom.xml | 28 ++----------------- 16 files changed, 13 insertions(+), 41 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index bb68494a..59483157 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -24,7 +24,7 @@ jobs: name: Build it uses: codehaus-plexus/.github/.github/workflows/maven.yml@master with: - matrix-exclude: '[ {"jdk": "8"} ]' + matrix-exclude: '[ {"jdk": "8"}, {"jdk": "11"} ]' jdk-distribution-matrix: '["zulu", "temurin", "microsoft", "liberica", "corretto"]' maven_args: 'verify javadoc:javadoc -e -B -V -fae' diff --git a/plexus-compiler-its/pom.xml b/plexus-compiler-its/pom.xml index 68dcffc7..4e3a1558 100644 --- a/plexus-compiler-its/pom.xml +++ b/plexus-compiler-its/pom.xml @@ -15,7 +15,7 @@ 4.13.2 - 11 + 17 true diff --git a/plexus-compiler-its/src/main/it/MCOMPILER-346-mre/invoker.properties b/plexus-compiler-its/src/main/it/MCOMPILER-346-mre/invoker.properties index 727ec07c..98a8e954 100644 --- a/plexus-compiler-its/src/main/it/MCOMPILER-346-mre/invoker.properties +++ b/plexus-compiler-its/src/main/it/MCOMPILER-346-mre/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 11+ invoker.goals = clean compile invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/aspectj-compiler/invoker.properties b/plexus-compiler-its/src/main/it/aspectj-compiler/invoker.properties index 788d7f9f..94a712db 100644 --- a/plexus-compiler-its/src/main/it/aspectj-compiler/invoker.properties +++ b/plexus-compiler-its/src/main/it/aspectj-compiler/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ invoker.goals = clean test #invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/eclipse-compiler-mapstruct/invoker.properties b/plexus-compiler-its/src/main/it/eclipse-compiler-mapstruct/invoker.properties index ddf39fcf..f71b57af 100644 --- a/plexus-compiler-its/src/main/it/eclipse-compiler-mapstruct/invoker.properties +++ b/plexus-compiler-its/src/main/it/eclipse-compiler-mapstruct/invoker.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ +invoker.maven.version = 3.9.6+ # without-dummy profile is used to have compiler plugin do actual compilation in the second run invoker.name.1 = Initial build diff --git a/plexus-compiler-its/src/main/it/error-prone-compiler/invoker.properties b/plexus-compiler-its/src/main/it/error-prone-compiler/invoker.properties index 0ebe374a..e3646a42 100644 --- a/plexus-compiler-its/src/main/it/error-prone-compiler/invoker.properties +++ b/plexus-compiler-its/src/main/it/error-prone-compiler/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ invoker.goals = clean test-compile invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/missing-warnings/invoker.properties b/plexus-compiler-its/src/main/it/missing-warnings/invoker.properties index 7265e231..9f1353ff 100644 --- a/plexus-compiler-its/src/main/it/missing-warnings/invoker.properties +++ b/plexus-compiler-its/src/main/it/missing-warnings/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 11+ invoker.goals = clean compile #invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/simple-eclipse-compiler-fail/invoker.properties b/plexus-compiler-its/src/main/it/simple-eclipse-compiler-fail/invoker.properties index 0ebe374a..e3646a42 100644 --- a/plexus-compiler-its/src/main/it/simple-eclipse-compiler-fail/invoker.properties +++ b/plexus-compiler-its/src/main/it/simple-eclipse-compiler-fail/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ invoker.goals = clean test-compile invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/simple-eclipse-compiler/invoker.properties b/plexus-compiler-its/src/main/it/simple-eclipse-compiler/invoker.properties index f419c5fa..b3ec3cb3 100644 --- a/plexus-compiler-its/src/main/it/simple-eclipse-compiler/invoker.properties +++ b/plexus-compiler-its/src/main/it/simple-eclipse-compiler/invoker.properties @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ +invoker.maven.version = 3.9.6+ + invoker.goals = clean test-compile #invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/simple-javac-fork/invoker.properties b/plexus-compiler-its/src/main/it/simple-javac-fork/invoker.properties index f419c5fa..0054ee30 100644 --- a/plexus-compiler-its/src/main/it/simple-javac-fork/invoker.properties +++ b/plexus-compiler-its/src/main/it/simple-javac-fork/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ invoker.goals = clean test-compile #invoker.buildResult = failure diff --git a/plexus-compiler-its/src/main/it/simple-javac-fork/pom.xml b/plexus-compiler-its/src/main/it/simple-javac-fork/pom.xml index df34466f..2ed55a79 100644 --- a/plexus-compiler-its/src/main/it/simple-javac-fork/pom.xml +++ b/plexus-compiler-its/src/main/it/simple-javac-fork/pom.xml @@ -32,8 +32,8 @@ UTF-8 UTF-8 - 11 - @pom.version@ + 11 + @project.version@ diff --git a/plexus-compiler-its/src/main/it/simple-javac/invoker.properties b/plexus-compiler-its/src/main/it/simple-javac/invoker.properties index f419c5fa..0054ee30 100644 --- a/plexus-compiler-its/src/main/it/simple-javac/invoker.properties +++ b/plexus-compiler-its/src/main/it/simple-javac/invoker.properties @@ -15,6 +15,5 @@ # specific language governing permissions and limitations # under the License. -invoker.java.version = 1.8+ invoker.goals = clean test-compile #invoker.buildResult = failure diff --git a/plexus-compilers/plexus-compiler-aspectj/pom.xml b/plexus-compilers/plexus-compiler-aspectj/pom.xml index 31aeefac..f1b9095f 100644 --- a/plexus-compilers/plexus-compiler-aspectj/pom.xml +++ b/plexus-compilers/plexus-compiler-aspectj/pom.xml @@ -14,7 +14,7 @@ AspectJ Compiler support for Plexus Compiler component. - 11 + 11 diff --git a/plexus-compilers/plexus-compiler-eclipse/pom.xml b/plexus-compilers/plexus-compiler-eclipse/pom.xml index 757f4fca..ffe4aa7d 100644 --- a/plexus-compilers/plexus-compiler-eclipse/pom.xml +++ b/plexus-compilers/plexus-compiler-eclipse/pom.xml @@ -14,7 +14,7 @@ Eclipse Compiler support for Plexus Compiler component. - 11 + 17 diff --git a/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml b/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml index 7e0d4a2d..77f27c82 100644 --- a/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml +++ b/plexus-compilers/plexus-compiler-javac-errorprone/pom.xml @@ -16,7 +16,7 @@ See https://errorprone.info - 11 + 11 diff --git a/pom.xml b/pom.xml index 0f3f963c..4e9ddf47 100644 --- a/pom.xml +++ b/pom.xml @@ -42,8 +42,7 @@ scm:git:git@github.com:codehaus-plexus/plexus-compiler.git - 11 - 8 + 8 true 2022-12-17T17:23:49Z 5.10.1 @@ -190,13 +189,6 @@ org.apache.maven.plugins maven-enforcer-plugin 3.4.1 - - - org.codehaus.mojo - extra-enforcer-rules - 1.7.0 - - enforce-java @@ -206,26 +198,12 @@ - [11,) - [ERROR] OLD JDK [${java.version}] in use. This projects requires JDK 11 or newer + [17,) + [ERROR] OLD JDK [${java.version}] in use. This projects requires JDK 17 or newer - - enforce-bytecode-version - - enforce - - - - - ${maven.compiler.release} - - - true - - From 984622862226a9824ac226ccc685d77d1a89247c Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 10 Dec 2023 09:18:19 +0100 Subject: [PATCH 2/3] Try with Maven 3.9.6 --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 59483157..cc1f2f4c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -22,7 +22,7 @@ on: [push, pull_request] jobs: build: name: Build it - uses: codehaus-plexus/.github/.github/workflows/maven.yml@master + uses: codehaus-plexus/.github/.github/workflows/maven.yml@mvn-setup with: matrix-exclude: '[ {"jdk": "8"}, {"jdk": "11"} ]' jdk-distribution-matrix: '["zulu", "temurin", "microsoft", "liberica", "corretto"]' @@ -31,5 +31,5 @@ jobs: deploy: name: Deploy needs: build - uses: codehaus-plexus/.github/.github/workflows/maven-deploy.yml@master + uses: codehaus-plexus/.github/.github/workflows/maven-deploy.yml@mvn-setup secrets: inherit From 4b4625ec0dd7788a3389384f98cd8615a02ba207 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Sun, 10 Dec 2023 09:42:04 +0100 Subject: [PATCH 3/3] Back GitHub action to default version --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index cc1f2f4c..59483157 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -22,7 +22,7 @@ on: [push, pull_request] jobs: build: name: Build it - uses: codehaus-plexus/.github/.github/workflows/maven.yml@mvn-setup + uses: codehaus-plexus/.github/.github/workflows/maven.yml@master with: matrix-exclude: '[ {"jdk": "8"}, {"jdk": "11"} ]' jdk-distribution-matrix: '["zulu", "temurin", "microsoft", "liberica", "corretto"]' @@ -31,5 +31,5 @@ jobs: deploy: name: Deploy needs: build - uses: codehaus-plexus/.github/.github/workflows/maven-deploy.yml@mvn-setup + uses: codehaus-plexus/.github/.github/workflows/maven-deploy.yml@master secrets: inherit