gnodet opened a new issue, #12990:
URL: https://github.com/apache/maven/issues/12990
## Problem
Maven plugin projects that compile against Maven API fail with Maven 4
because `MojoExecutionException` is not resolved as a subclass of `Throwable`:
```
[ERROR] No exception of type MojoExecutionException can be thrown;
an exception type must be a subclass of Throwable
[ERROR] The type java.io.IOException cannot be resolved.
It is indirectly referenced from required .class files
```
This is a **compilation error** (not runtime), indicating that Maven 4's API
jar structure has changed in a way that breaks the class hierarchy resolution.
The compiler cannot trace `MojoExecutionException → Exception → Throwable`
through the Maven 4 API dependency chain.
## Affected project
- `dolphinscheduler-maven-plugin` — a Maven plugin project that depends on
`maven-plugin-api`
## Analysis
The errors suggest that `maven-plugin-api` in Maven 4 no longer transitively
exposes the full class hierarchy needed for compilation. The compiler sees
`MojoExecutionException` but cannot resolve its parent chain to
`java.lang.Throwable`, and also cannot resolve `java.io.IOException` when it's
"indirectly referenced."
This project builds successfully with Maven 3.
## Context
Data from [maven4-testing](https://github.com/gnodet/maven4-testing) run
#13307 testing `maven-4.0.x` against all Apache projects.
--
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]