Book Image

Apache Maven Cookbook

Book Image

Apache Maven Cookbook

Overview of this book

Table of Contents (18 chapters)
Apache Maven Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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>
                <goals>
                  <goal>add-resource</goal&gt...