gnodet commented on issue #12990: URL: https://github.com/apache/maven/issues/12990#issuecomment-5491708750
## Analysis This is **not a Maven 4 regression**. The compilation failure reproduces identically with **Maven 3.9.16 + JDK 11/17/21** — the project only works with JDK 8. ### Root cause The `dolphinscheduler-maven-plugin` uses `<packaging>takari-maven-plugin</packaging>` with the [takari-lifecycle-plugin](https://github.com/takari/takari-lifecycle-plugin) v1.11.9 (released ~2017) configured to use the **Eclipse JDT compiler** (`<takari.compilerId>jdt</takari.compilerId>`). The JDT compiler bundled in takari-lifecycle-plugin 1.11.9 predates Java 9 and does **not** support the JRT filesystem (`jrt:/`) used by Java 9+ to provide system classes. It looks for `rt.jar` on the boot classpath, which was removed in JDK 9. Without access to JDK system classes, **all** JDK types (`String`, `Class`, `File`, `Set`, `IOException`, `Exception`, `Throwable`, etc.) become invisible to the compiler. This is why `MojoExecutionException` appears to not be a subclass of `Throwable` — the compiler can't resolve `Throwable` at all, so it can't trace the hierarchy `MojoExecutionException → AbstractMojoExecutionException → Exception → Throwable`. ### Reproduction | Build tool | JDK | Result | |---|---|---| | Maven 3.9.16 | JDK 8 | ✅ BUILD SUCCESS | | Maven 3.9.16 | JDK 11 | ❌ Same JDT errors | | Maven 3.9.16 | JDK 21 | ❌ Same JDT errors | | Maven 4.1.0-SNAPSHOT | JDK 21 | ❌ Same JDT errors | Since Maven 4 requires JDK 17+, this project cannot build with Maven 4 in its current form — but the incompatibility is between the takari-lifecycle-plugin and Java 9+, not between the project and Maven 4. ### Not related to Maven 4's API jar restructuring The issue title mentions "Maven 4's API jar restructuring" but the actual errors show the JDT compiler can't resolve **any** JDK classes, including `java.lang.String`. This confirms the issue is in the compiler's system library resolution, not in Maven's API dependency chain. Closing as this is a third-party plugin compatibility issue with modern JDKs, not a Maven 4 regression. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
