Skip to content

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 27, 2025

JIRA issue: MNG-5668

When a build step fails, Maven should still execute its corresponding after:* phases to ensure proper cleanup. This fix modifies the BuildPlanExecutor to:

  • Execute after:* phases when their corresponding before:* phase has been executed
  • Maintain proper phase ordering during failure handling
  • Handle cleanup phase failures gracefully without affecting the original error
  • Preserve concurrent build capabilities

This ensures cleanup tasks (like resource cleanup or test environment teardown) are properly executed even when the build fails.

JIRA issue: [MNG-5668](https://issues.apache.org/jira/browse/MNG-5668)

When a build step fails, Maven should still execute its corresponding after:* phases to ensure proper cleanup. This fix modifies the BuildPlanExecutor to:

- Execute after:* phases when their corresponding before:* phase has been executed
- Maintain proper phase ordering during failure handling
- Handle cleanup phase failures gracefully without affecting the original error
- Preserve concurrent build capabilities

This ensures cleanup tasks (like resource cleanup or test environment teardown) are properly executed even when the build fails.
@gnodet gnodet added this to the 4.0.0-rc-4 milestone Mar 27, 2025
@gnodet gnodet self-assigned this Mar 27, 2025
@gnodet gnodet merged commit 7cfbdc5 into apache:master Mar 28, 2025
13 checks passed
@Bukama Bukama added bug Something isn't working and removed maintenance labels Jun 19, 2025
@jira-importer
Copy link

Resolve #6656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants