merge issue from parent causing executions to be run multiple times
-------------------------------------------------------------------
Key: MANTRUN-57
URL: http://jira.codehaus.org/browse/MANTRUN-57
Project: Maven 2.x Antrun Plugin
Issue Type: Bug
Affects Versions: 1.1
Environment: Linux Fedora Core 5, SUN JDK 1.5
Reporter: Hung Le
Fix For: 1.1
Attachments: antrun-testcase.zip, epom.xml
Has parent/child project
parent
child1
in parent's pom.xml, define a "run"
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>e1</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<echo message="ant e1" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
In child,'s pom.xml, define another "run"
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>e2</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<echo message="ant e2" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expect the two declaration to be merged so that during the generate-sources
phase for the child I will see
ant e1
ant e2
what happens right now
[INFO] [antrun:run {execution: e1}]
[INFO] Executing tasks
[echo] ant e1
[INFO] Executed tasks
[INFO] [antrun:run {execution: e2}]
[INFO] Executing tasks
[echo] ant e2
[INFO] Executed tasks
[INFO] [antrun:run {execution: e1}]
[INFO] Executing tasks
[echo] ant e1
[INFO] Executed tasks
[INFO] [antrun:run {execution: e2}]
[INFO] Executing tasks
[echo] ant e2
help:effective-pom shows the merged pom at the child with merge but duplicated
antrun plugin declaration
...
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>e1</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="ant e1"></echo>
</tasks>
</configuration>
</execution>
<execution>
<id>e2</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="ant e2"></echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>e1</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="ant e1"></echo>
</tasks>
</configuration>
</execution>
<execution>
<id>e2</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="ant e2"></echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
..
Attached please find
. *.zip has a sample parent/child example, you can go to child1 and do
mvn compile
. epom.xml is the output of 'mvn help:effective-pom' for the child project
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira