You are previewing Maven: The Definitive Guide.

Maven: The Definitive Guide

Cover of Maven: The Definitive Guide by Sonatype Company Published by O'Reilly Media, Inc.
O'Reilly logo

Using the Maven Help Plugin

Throughout the book, we will be introducing Maven plugins and talking about Maven Project Object Model (POM) files, settings files, and profiles. There are going to be times when you need a tool to help you make sense of some of the models that Maven is using and what goals are available on a specific plugin. The Maven Help plugin allows you to list active Maven profiles, display an effective POM, print the effective settings, or list the attributes of a Maven plugin.

Note

For a conceptual overview of the POM and plugins, see Chapter 3.

The Maven Help plugin has four goals. The first three goals—active-profiles, effective-pom, and effective-settings—describe a particular project and must be run in the base directory of a project. The last goal—describe—is slightly more complex, showing you information about a plugin or a plugin goal. The following commands provide some general information about the four goals:

help:active-profiles

Lists the profiles (project, user, global) that are active for the build.

help:effective-pom

Displays the effective POM for the current build, with the active profiles factored in.

help:effective-settings

Prints out the calculated settings for the project, given any profile enhancement and the inheritance of the global settings into the user-level settings.

help:describe

Describes the attributes of a plugin. This need not run under an existing project directory. You must give at least the groupId and artifactId of the plugin you wish to ...

The best content for your career. Discover unlimited learning on demand for around $1/day.