BOM compiles plugins with target 11

21 views
Skip to first unread message

Ullrich Hafner

unread,
Nov 10, 2022, 2:03:31 AM11/10/22
to JenkinsCI Developers
I’m struggling with the BOM builds of some plugins:


It seems that the BOM compiles and builds plugins with target JDK 11 even though the plugin is not yet ready for JDK target (due to some missing `opens` directives during testing). (The baseline still is for JDK8)     

During the PCT I get:

[INFO] --- maven-hpi-plugin:3.33:initialize (default-initialize) @ checks-api ---

[INFO] Setting maven.compiler.release to 11

[INFO] Setting maven.compiler.testRelease to 11

[INFO]



Which I do not have when running the plugin build locally.

This causes a failure of:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-cli) on project checks-api: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test failed: org.junit.platform.commons.JUnitException: TestEngine with ID 'archunit' failed to discover tests: ExceptionInInitializerError: class com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule cannot be cast to class com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction (com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule and com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction are in unnamed module of loader org.apache.maven.surefire.booter.IsolatedClassLoader @5cf39df6) -> [Help 1]



Is there a toggle to define in the BOM that the plugin build is not ready for JDK11? 

Jesse Glick

unread,
Nov 10, 2022, 10:00:23 AM11/10/22
to jenkin...@googlegroups.com
On Thu, Nov 10, 2022 at 2:03 AM Ullrich Hafner <ullrich...@gmail.com> wrote:
This causes a failure of:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-cli) on project checks-api: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test failed: org.junit.platform.commons.JUnitException: TestEngine with ID 'archunit' failed to discover tests: ExceptionInInitializerError: class com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule cannot be cast to class com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction (com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule and com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction are in unnamed module of loader org.apache.maven.surefire.booter.IsolatedClassLoader @5cf39df6) -> [Help 1]


I just tried `mvn -f checks-api-plugin clean verify` locally using JDK 11 and it passed.

Is there a toggle to define in the BOM that the plugin build is not ready for JDK11?

No, I think all plugins are expected to be buildable on JDK 11 even if their runtime baseline remains Java 8.

Ullrich Hafner

unread,
Nov 10, 2022, 6:42:07 PM11/10/22
to JenkinsCI Developers
Am 10.11.2022 um 16:00 schrieb 'Jesse Glick' via Jenkins Developers <jenkin...@googlegroups.com>:

On Thu, Nov 10, 2022 at 2:03 AM Ullrich Hafner <ullrich...@gmail.com> wrote:
This causes a failure of:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-cli) on project checks-api: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test failed: org.junit.platform.commons.JUnitException: TestEngine with ID 'archunit' failed to discover tests: ExceptionInInitializerError: class com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule cannot be cast to class com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction (com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule and com.tngtech.archunit.lang.syntax.elements.ClassesShouldConjunction are in unnamed module of loader org.apache.maven.surefire.booter.IsolatedClassLoader @5cf39df6) -> [Help 1]

I just tried `mvn -f checks-api-plugin clean verify` locally using JDK 11 and it passed.


The plugin compiles with JDK11 and JDK17 fine on my machine as well. 

It is just my BOM PR that fails (also locally when I start it with PLUGINS=checks-api bash local-test.sh)

It seems to set the target JDK to 11 which is not what I want, the target should still be JDK8 (at least for now). 

Is there a toggle to define in the BOM that the plugin build is not ready for JDK11?

No, I think all plugins are expected to be buildable on JDK 11 even if their runtime baseline remains Java 8.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1mpAeos5ZC2%3D%3DiFpCXta6z-Dc9-PT7pY%3D50cb-wA8fAQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages