Maven
  1. Maven
  2. MNG-2054

Multiple Inheritence causes plugin executions to run multiple times (Test Case Attached)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.4
    • Labels:
      None
    • Environment:
      WinXp

      Description

      See the attached sample. If a plugin execution is set in a parent of a parent, when the child is built from either aggregator, the plugin execution runs multiple times. In my sample, I set the sources to be generated, but when run, see that the sources are generated and installed 2x.

      [INFO] Building jar: E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-tests.jar
      [INFO] [install:install]
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT.jar to f:\mavenRepo\sampl
      e-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT.jar
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-sources.jar to f:\mavenRe
      po\sample-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT-sources.jar
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-sources.jar to f:\mavenRe
      po\sample-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT-sources.jar
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-tests.jar to f:\mavenRepo
      \sample-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT-tests.jar
      [INFO]

      If run directly from the child build, the sources are only built 1x:
      [INFO] [jar:jar]
      [INFO] Building jar: E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT.jar
      [INFO] [source:jar

      {execution: attach-source}

      ]
      [INFO] Building jar: E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-sources.jar
      [INFO] [jar:test-jar

      {execution: default}

      ]
      [INFO] Building jar: E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-tests.jar
      [INFO] [install:install]
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT.jar to f:\mavenRepo\sampl
      e-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT.jar
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-sources.jar to f:\mavenRe
      po\sample-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT-sources.jar
      [INFO] Installing E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-tests.jar to f:\mavenRepo
      \sample-project\sample-jar\SNAPSHOT\sample-jar-SNAPSHOT-tests.jar

      1. sample.zip
        6 kB
        Brian Fox
      2. sample-regression.zip
        19 kB
        Brian Fox
      3. antrun2.tgz
        0.7 kB
        kenneyw

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Brett Porter
              Reporter:
              Brian E. Fox
            • Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development