Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.9, 2.1.0-M1
-
None
Description
As MSHADE-44 shows, the execution project created for a mojo execution that forks the lifecycle is still accessible to later mojo executions althought these later mojo executions did not request a forked lifecycle. While mojos should not depend on the execution project unless they fork by themselves, the core should probably wipe out any mojo-related state bits from the MavenProject instance before executing another mojo.
IIRC, the same applies to the project dependencies available to a mojo. Currently, badly written mojos can still get proper dependency sets if some other mojo triggered dependency resolution before. For deterministic behavior, mojos should only see those deps that they requested themselves via {@requiresDependencyResolution.