It would be beneficial, if some plugin configuration properties (of list, map or array type, not simple types) could be extended from the parent POM by inheritance.
Currently the value specified in the child configuration overwrites the value specified by the parent POM. This is OK for simple properties. For collection properties however, it would be nice, if the collection specified by the parent is extended with the entries specified by the child configuration.
As an illustration imagine a parent POM defining a plugin configuration:
------------------
....
<configuration>
<imports>
<import>com.company.package1</import>
<import>com.company.package2</import>
</imports>
</configuration>
....
------------------
It would be nice if a child POM could add to the <imports> from the parent another <import> like this:
------------------
....
<configuration>
<imports>
<import>com.company.package3</import>
</imports>
</configuration>
....
------------------
This is however not possible, as the <imports> property in the child configuration overwrites the one specified in the parent's configuration. This forces the child POM to specify all three <imports> entries in its plugin configuration.
It should be somehow possible to specify on a per property basis, if the parent's collection property is to be extended or overwritten.
I tried to implement this "collection property inheritance" in my plugin, by iterating down the parent MavenProjects and accessing their Xpp3Dom configuration directly. This works fine. However when the LifeCycle is forked (by the clover plugin for example), project.getParent() returns null.
Does someone have an idea how to access the Parent's POM plugin configuration?