rmannibucau opened a new pull request, #13944: URL: https://github.com/apache/maven/pull/13944
Fixes the noisy error footer that Maven printed after a failed build: ``` [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException [ERROR] ``` ### What changed - Removed the `[Help N]` inline suffix and the "For more information… please read the following articles" footer from both CLI paths (`MavenInvoker` and the legacy `MavenCli`). - Replaced the reference to the (partly dead) cwiki pages with embedded help text shipped as resources in `impl/maven-core/src/main/resources/org/apache/maven/errors/`: - `MojoExecutionException.txt` - `ConnectException.txt` - `LinkageError.txt` - `PluginExecutionException.txt` - `AetherClassNotFound.txt` - `PluginContainerException.txt` - `LifecycleExecutionException.txt` - `RemoteRepositoryFiltering.txt` - Added `ReferenceHelp` (maven-core): maps an `ExceptionSummary` reference (plain key or wiki URL, incl. the existing `https://maven.apache.org/resolver/remote-repository-filtering.html` URL) to the matching resource, returning `null` when none exists. - In the CLI error path, when a detail file exists for the failing exception type the content is logged at **debug** level (`-X`), and the `-X` hint is reworded accordingly: - with details available: "Re-run Maven using the '-X' switch to enable full debug logging and details about the error" - otherwise: unchanged "…to enable verbose output" - Unknown/third-party references for which no resource exists produce no output. The public API is preserved: `ExceptionSummary.getReference()` and `DefaultExceptionHandler` are unchanged (the RRF URL is still returned as-is). ### Tests - New `ReferenceHelpTest` covering key normalization (plain/cwiki/URL), built-in resources resolution, and unknown-reference behavior. - Updated `MavenITmng5482AetherNotFoundTest`: asserts the cwiki URL is **no longer** printed, the reworded `-X` hint is shown, and that `-X` logs the embedded help text. - Updated the `MavenITmng8469InterpolationPrecendenceTest` comment and the IT suite docs example. - Verified: `mvn -pl impl/maven-core,impl/maven-cli,compat/maven-embedder spotless:check`, unit tests (`DefaultExceptionHandlerTest`, `ReferenceHelpTest`), and the affected core ITs (`MavenITmng5482AetherNotFoundTest`, `MavenITmng8469InterpolationPrecendenceTest`) all pass against the branch-built distribution. -- 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]
