You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matt McGill <ma...@gmail.com> on 2006/02/24 15:36:42 UTC

[m2]Execute target on child, but not parent?

I have a multi-module project, and for various reasons only want to  
execute maven on the parent pom. However, I have a plugin that only  
makes sense to configure/execute on some of the child modules. The  
plugin target I want to execute shouldn't really be attached to a  
phase in the build lifecycle, but I can't think of a way to configure  
my project such that executing mvn plugin:target on the parent pom  
will result in the plugin target being executed on only those child  
modules for which the plugin is configured. Is there any way to pull  
this off (by explicitly disabling the plugin in the parent and  
children for which is should not run, for instance)?

Thanks,
-Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2]Execute target on child, but not parent?

Posted by John Tolentino <jt...@exist.com>.
Hi Matt,

Try to individually declare and configure the plugin only in the modules 
that needs it and don't declare it in your parent POM.

Regards,
John

Matt McGill wrote:

> I have a multi-module project, and for various reasons only want to  
> execute maven on the parent pom. However, I have a plugin that only  
> makes sense to configure/execute on some of the child modules. The  
> plugin target I want to execute shouldn't really be attached to a  
> phase in the build lifecycle, but I can't think of a way to configure  
> my project such that executing mvn plugin:target on the parent pom  
> will result in the plugin target being executed on only those child  
> modules for which the plugin is configured. Is there any way to pull  
> this off (by explicitly disabling the plugin in the parent and  
> children for which is should not run, for instance)?
>
> Thanks,
> -Matt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org