gnodet opened a new pull request, #12807: URL: https://github.com/apache/maven/pull/12807
## Backport of #12707 Cherry-pick of #12707 onto `maven-4.0.x`. **Original PR:** #12707 - Fix duplicate model problem reporting, fixes #12691 **Original author:** @Mazen050 **Target branch:** `maven-4.0.x` ### Original description Fixes #12691 by removing the duplicate rendering of model problems introduced in `ProjectBuildingException#createMessage(...)`. The detailed per-project diagnostics were added to the exception message in #10975. However, `DefaultExceptionHandler` already reconstructs and renders the same information from `ProjectBuildingException#getResults()`, so the new exception message caused the same diagnostics to be printed twice. This change restores the previous behavior by reverting `ProjectBuildingException#createMessage(List<ProjectBuildingResult>)` to return the short summary message, leaving the existing rendering in `DefaultExceptionHandler` as the single source of detailed diagnostics. `ProjectBuildingExceptionTest` is removed because it was introduced to validate the detailed formatting added in #10975. Reverting that behavior makes the test obsolete; the remaining behavior is simply returning the generic exception message. Each model problem is now reported once again, matching the pre-4.0.0-rc-6 behavior. -- 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]
