Merged upstreamCorrectnessMerged Sep 15, 2026
Select the execution root as Maven's current project
Initializes the current project from the selected execution root rather than the first reactor-sorted project.
apache/maven · #13103
Problem
Lifecycle extensions could receive a dependency module as the current project when invoked at a multimodule execution root, leading to incorrect module selection.
Approach
Chooses the selected execution root while retaining the first-project fallback for filtered reactors. Reactor order, per-module overrides, null clearing, thread-local state, and cloned-session behavior are preserved.
Impact and scope
- Gives lifecycle participants the correct initial project context in multimodule builds.
- Corrects extension-visible selection without reordering reactor execution or removing filtered-reactor fallback.
Validation
- The PR reports failing-before/passing-after regressions and the original reproducer selecting parent instead of child1 on JDK 21.
- Full verify and Core IT runs passed; GitHub build/integration matrices passed on Linux, macOS, Windows and JDK 17/21/25. The issue is closed and the verified merge commit credits Goutam Adwant.