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:
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.