Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.0.2
-
Fix Version/s: 2.0.4
-
Component/s: Inheritance and Interpolation
-
Labels:None
-
Environment:WinXp
-
Complexity:Intermediate
-
Testcase included:yes
-
Number of attachments :
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
]
[INFO] Building jar: E:\STC\sample\sample-parent2\sample-jar\target\sample-jar-SNAPSHOT-sources.jar
[INFO] [jar:test-jar
]
[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
Issue Links
- is related to
-
MNG-2221
Multiple Executions of Plugin at Difference Inhertiance levels causes plugin executions to run multiple times
-
-
MNG-4879
CLONE -Multiple Executions of Plugin at Difference Inhertiance levels causes plugin executions to run multiple times
-
-
MNG-2237
Inherited plugin executed twice if child pom merges configuration
-
- relates to
-
MNG-1701
Validate that a plugin is not configured twice in the pom
-
Further investigation using help:effective-pom shows that the plugin configuration actually gets included 2x in the pom. Shouldn't executions with the same name be merged with their parent?