maven-compiler-plugin icon indicating copy to clipboard operation
maven-compiler-plugin copied to clipboard

Remove JDK-8318913 workaround for JDK 22+

Open cowwoc opened this issue 3 months ago • 1 comments

New feature, improvement proposal

Per https://bugs.openjdk.org/browse/JDK-8318913 this issue is fixed in JDK 22 onward but I am still seeing this output in JDK 25:

JDK-8318913 workaround: patched module-info.class requires version from [25] to [25] on 2 JDK modules [java.base, java.compiler]

cowwoc avatar Sep 19 '25 16:09 cowwoc

We cannot remove the workaround as long as running Maven with Java 21 is supported. However, the compiler plugin should detect when the Java version is 22 or newer, and not try to patch the module-info.class file in such case.

The compiler plugin 4.0.0-beta already does this check. Therefore, this issue is against the version 3 of the plugin.

desruisseaux avatar Sep 19 '25 22:09 desruisseaux