Due to the way plugins are instantiated you can achieve what you wish doing
the following:

Define the configurations of your reporting plugins via the standard
<pluginsManagement> section of your parent POM (optional).

Then bind the reporting plugins to the build lifecycle of the children (i.e.
in <build><plugins>). They will not run as they do not have a default phase,
being designed to be run by site only. However Maven will instantiate them
and will use the parent <pluginManagement> configs while doing so. When site
is run Maven will re-use the already instantiated reporting plugins. 

To control when this build binding should be applied you can either put the
plugins in a profile (and thus they only get defined in the parent) or bind
them to pre-site, that way they'll only get instantiated when being used in
site generation.

John


dennisl-2 wrote:
> 
> simon wrote:
>> Hi,
>> 
>> I would like to define some report configuration in a parent pom, so
>> that they apply to child modules. In particular, the maven-pmd-plugin
>> needs some config common to all the submodules. 
>> 
>> But I do not want those reports to actually *run* for the parent; it
>> makes no sense to have a pmd report in the parent site's reports
>> section, as the parent project has no code.
>> 
>> For a build plugin, this kind of configuration be done in the
>> pluginManagement section. But configuring a report plugin in
>> pluginManagement does not appear to affect reports, and there is no
>> reportManagement section.
>> 
>> So what is the equivalent for report plugins?
> 
> Unfortunately there is no equivalent. But there is an issue for it if
> you want to vote:
> 
> http://jira.codehaus.org/browse/MNG-1931
> 
>> Is it something to do with the reportSets section? I have read the maven
>> docs on that several times and just don't understand what this is meant
>> to do..
> 
> reportSets are used by plugins that output multiple reports. An example
> of this is maven-changelog-plugin:
> 
> http://maven.apache.org/plugins/maven-changelog-plugin/examples/selecting-reports.html
> 
>> 
>> Thanks,
>> 
>> Simon
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> 
> -- 
> Dennis Lundberg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/buildManagement-for-reports-tp14625165s177p14635516.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]

Reply via email to