try adding <inherited>false</inherited> to the execution

Cheers,
Brett

2008/8/20 gotama <[EMAIL PROTECTED]>:
>
>
> I have a parent pom who exec's an ant plugin tasks, but I do not want the
> child pom of the parent to exec the same ant plugin <execution> when the
> child runs the ant plugin. It appears that the child pom's instance of the
> ant plugin inherits the parent pom's ant plugin executions - but I just want
> that ant plugin execution to exec in the parent pom, not in the child pom as
> well. How can I prevent the child pom from exec'ing its parents ant plugin
> execution?
>
> Thanks!
>
> The output from below would be:
> // when parent pom exec'd
> hello world - parent
> // when child pom exec'd
> hello world - parent
> hello world - child
>
> // however, I just want
> // when parent pom exec'd
> hello world - parent
> // when child pom exec'd
> hello world - child
>
> <!-- parent pom -->
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <id>parent</id>
> <phase>generate-resources</phase>
> <configuration>
> <tasks>
> <echo>hello world - parent</echo>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </plugin>
>
> <!-- from child pom -->
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <id>child</id>
> <phase>generate-resources</phase>
> <configuration>
> <tasks>
> <echo>hello world - child</echo>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </plugin>
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-prevent-child-pom-from-exec%27ing-parent-pom-ant-plugin-tasks-tp19060977p19060977.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to