You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pankaj Tandon <pa...@gmail.com> on 2009/11/27 21:10:08 UTC
Prevent a plugin executing for each module in a multi-module build
Hi,
I have a multi-module project and I'm trying to run the site plugin to
generate a site for the project. But I would like to generate the site ONLY
for the top level (aggregator) project.
Each of my child projects are aggregated AND they are children of the
top-level project because they have <parent/> specified.
So when I run site:deploy (or site-deploy), the build runs for the top level
project and then for EACH child project. I want it to run ONLY for the top
level project.
One way, I know to achieve this is to configure the site plug-in in each
child project with an inherited=false. But that is a bit crummy.
Does anyone know of a more elegant way to prevent the plug-in running for
the child projects (in a reactor build)
Also, it would be great if the solution were to apply to ANY plug-in, not
just the site plug-in.
Thanks
Pankaj
--
View this message in context: http://n2.nabble.com/Prevent-a-plugin-executing-for-each-module-in-a-multi-module-build-tp4077313p4077313.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Prevent a plugin executing for each module in a multi-module
build
Posted by Pankaj Tandon <pa...@gmail.com>.
Wendy Smoak wrote:
>
>
>
>> One way, I know to achieve this is to configure the site plug-in in each
>> child project with an inherited=false. But that is a bit crummy.
>
> What happens if you configure inherited=false in the parent?
>
>
>
>
That didn't help.
Here is my project structure:
scm-control-center (top level reactor) <-- I want site docs ONLY at this
level
|
+-- control-center (reactor for producing a webapp)
| |
| +-- common (domain model and
interfaces)
| |
| +-- dataAccess (holds DAOs)
| |
| +-- service (All the WLS and WAS
service impls)
| |
| +-- web (icefaces frontend and
webapp)
|
+-- db (holds the hosts.xml file)
I configured the site plugin in the top-level pom like so:
<build>
<plugins>
<plugin>
<inherited>false</inherited>
<artifactId>maven-site-plugin</artifactId>
</plugin>
</plugins>
</build>
I still get the following:
C:\eclipseWorkspaces\ws2\scm-control-center>mvn site:site -Dlabel=1.0.0
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] scm-control-center
[INFO] control-center
[INFO] control-center-common
[INFO] control-center-dataAccess
[INFO] control-center-service
[INFO] control-center-web
[INFO] scm-hostsxml-center
[INFO]
------------------------------------------------------------------------
[INFO] Building scm-control-center
[INFO] task-segment: [site:site]
[INFO]
------------------------------------------------------------------------
[INFO] [site:site]
[INFO] Generating "Project Team" report.
[INFO]
------------------------------------------------------------------------
[INFO] Building control-center
[INFO] task-segment: [site:site]
[INFO]
------------------------------------------------------------------------
[INFO] [site:site]
[INFO] Parent project loaded from repository.
[INFO]
------------------------------------------------------------------------
Looking at the above it seems that the task-segment site:site is being
executed for the control-center child project which is what inherited=false
should have suppressed.
--
View this message in context: http://n2.nabble.com/Prevent-a-plugin-executing-for-each-module-in-a-multi-module-build-tp4077313p4087802.html
Sent from the maven users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Prevent a plugin executing for each module in a multi-module
build
Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Nov 27, 2009 at 1:10 PM, Pankaj Tandon <pa...@gmail.com> wrote:
> One way, I know to achieve this is to configure the site plug-in in each
> child project with an inherited=false. But that is a bit crummy.
What happens if you configure inherited=false in the parent?
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org