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

Execution order of child plugins is arbitrary if inheritance is involved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 2.0.1
    • None
    • None
    • Patch

    Description

      This is related to MNG-1499, but different, and, in my opinion, equally important. It makes sense that the order of plugin execution should be the same as it appears in the POM. For example, I have two plugins: one that generates a batch file and one that executes it. These plugins must run in order or the build will fail. However, the current implementation of ModelUtils.mergePluginLists does not respect the order of child plugins.

      There is also a seperate bug in that the assembledPlugins map is being checked for the presence of child plugins before adding them to the mergedPlugins list, but nothing is ever added to assembledPlugins. So if a plugin exists in a parent and a child, it will end up appearing twice in the child's plugin list.

      I have re-written this method to fix both these problems. See attached.

      Attachments

        1. mergePluginLists.txt
          3 kB
          John Didion

        Issue Links

          Activity

            People

              jdcasey John Dennis Casey
              jdidion John Didion
              Votes:
              17 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: