[
http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237713#action_237713
]
Olivier Lamy edited comment on MSITE-484 at 10/6/10 3:00 PM:
-------------------------------------------------------------
What you have to do is to add to indicate how to merge site plugin
configuration when maven build the model
in the child pom, you can change to ( attribute combine.children="append" )
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>version</version>
<configuration>
<reportPlugins combine.children="append">
{code}
btw this doesn't fix overriding configuration, with this trick some plugins can
be executed more than one time :-(
was (Author: olamy):
What you have to do is to add to indicate how to merge site plugin
configuration when maven build the model
in the child pom, you can change to ( attribute combine.children="append" )
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>version</version>
<configuration>
<reportPlugins combine.children="append">
{code}
> Support adding and overriding report plugins in new maven-site-plugin 3.x
> reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
> Key: MSITE-484
> URL: http://jira.codehaus.org/browse/MSITE-484
> Project: Maven 2.x Site Plugin
> Issue Type: Bug
> Components: inheritance
> Affects Versions: 3.0-beta-1
> Environment: 3.0-beta-1-SNAPSHOT
> Reporter: Michael Pilquist
> Assignee: Olivier Lamy
> Fix For: 3.0-beta-3
>
> Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that
> there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.
> For large, multi-module builds, it is problematic having to respecify all
> reporting plugins in any submodule pom that needs to either add an additional
> reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with
> project-info-reports and javadoc plugin and a submodule configured with jxr
> plugin and javadoc plugin. The relevant output is here:
> {code}
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target
> (included: [**], excluded: [])
> [INFO]
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent
> ---
> [INFO] configuring reportPlugin
> org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin
> org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test
> ---
> [INFO]
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @
> parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin
> org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins
> parameter is just a regular array parameter. AFAIK, there's no way to merge
> list configuration items. Other plugins have worked around this by defining
> additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands /
> additionalBuildCommands --
> http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).
> This isn't the most flexible option though as it only solves 1 level
> inheritance.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira