Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
<plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>install</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks if="jboss.local.repository"> <property name="version.id" value="${project.version}"/> <property name="jboss.local.repository" value="${jboss.local.repository}"/> <ant antfile="ant/build-install.xml" target="install"/> </tasks> <tasks unless="jboss.local.repository"> <echo message="Cannot install to jboss.local.repository=${jboss.local.repository}"/> </tasks> </configuration> </execution> </executions> </plugin>
Always executes the last tasks element although 'jboss.local.repository' is set
[INFO] [antrun:run
{execution: default}]
[INFO] Executing tasks
[echo] Cannot install to jboss.local.repository=/home/tdiesler/svn/jboss.local.repository
[INFO] Executed tasks
Issue Links
- is related to
-
MNG-4487
POM allows duplicate plugin configuration
-
If you look at the documentation for the antrun:run goal, you will notice that its parameter tasks is not declared to be of type array/collection. So it's by design that you cannot have multiple <tasks> elements in the same <configuration>. The solution to your use case is to setup multiple <execution> elements, each one having only one <tasks> element.