Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3941

Execution project is accessible to later mojo executions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.9, 2.1.0-M1
    • 3.0-alpha-3
    • Plugins and Lifecycle
    • 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.

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              bentmann Benjamin Bentmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: