Performing multi-module plugin management

In multi-module projects, pluginManagement allows you to configure plugin information that can be used as required by child projects. The parent pom can define the configurations for various plugins used by different child projects. Each child project can chose the plugins that it needs for the build.

How to do it...

  1. Open a multi-module project (simple-multi-module).
  2. Add a configuration for the Maven build helper plugin in the pluginManagement section to copy additional resources:
     <pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.9.1</version> <executions> <execution> <id>add-resource</id> <phase>generate-resources</phase> ...

Get Apache Maven Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.