The simplest thing is to define the configuration which is common for all execution in a configuration block looks like this:
<project..> <modelVersion>4.0.0</modelVersion> <build> <pluginManagement> <plugins> <plugin> <groupId>..</groupId> <artifactId>..</artifactId> <version>1.0</version> <configuration> .. Global Configuration which is common for everything </configuration> </plugin> </plugins> </pluginManagement> </build> </project>
So the above should/could be done in your parent pom file of your multi module build. Now in a module which inherits from the parent you can configure it like this:
<project..> <modelVersion>4.0.0</modelVersion> <build> <plugins> <plugin> <groupId>..</groupId> <artifactId>..</artifactId> <executions> <execution> <id>special-exec1</id> <goals>..</goals <phase>..</phase> <configuration> ... supplemental configuration which is not part of the parent </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
So this will define the common configuration in the parent via the pluginManagement and each specialisation can be done in the child.
If you like to overwrite configuration or enhance parts of it this can be done like the following:
<project..> <modelVersion>4.0.0</modelVersion> <build> <plugins> <plugin> <groupId>..</groupId> <artifactId>..</artifactId> <executions> <execution> <id>special-exec1</id> <goals>..</goals <phase>..</phase> <configuration> <items combine.children="append"> <!-- combine.children="merge" is the default --> <item>child-1</item> </items> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
All the details can be read in the POM documentation search for combine.children. It is also possible to prevent the inheritance of the configuration from the parent if you need to see also the previously mentioned documentation.