HuzaifaChaudary opened a new pull request, #13055: URL: https://github.com/apache/maven/pull/13055
Closes #10415 , which is MNG-8678 . the concurrent builder wraps every step in `catch (Exception e)` , so a step that throws an `Error` is not caught at all . `step.status` never moves off `SCHEDULED` and `step.exception` stays null , so `isDone()` is false , the project's teardown step never becomes eligible , `handleBuildError` never runs and nothing is added to the result . the build finishes with an empty exception list and prints BUILD SUCCESS . the worker thread dies , but `PhasingExecutor.execute` decrements the active count in a `finally` , so nothing hangs either . it just quietly succeeds . the rest of the machinery already handles this . `handleBuildError` has a branch whose comment says *fail fast on RuntimeExceptions, Errors and "other" Throwables* , and the `failures` list is already `List<Throwable>` . only the plumbing feeding it was narrowed to `Exception` . the sequential builder catches `Throwable` , which is the inconsistency the report names . so this widens the two catches and the field they write to . six lines . i left `BuildContext.execute()` alone even though it also catches only `Exception` , because `DefaultMaven` catches `RuntimeException` , so an error on the main thread still propagates rather than turning into a success . that path does not produce this symptom . two tests . one throws an `Error` from a build step and asserts it reaches `getResult().getExceptions()` , which fails without the change with *expected the error to be recorded, but got: []* . the other throws a `RuntimeException` , which already worked , so a change that was too wide would show up there . `mvn -pl impl/maven-core test` is 683 passing , 0 failures , and spotless and checkstyle are bound in that run and clean . i have not run the core integration tests , they live in another repo and need a full distribution build . -- 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]
