Friday, April 24, 2009

See Maven "effective" POM

Maven always executes against an effective POM, a combination of settings from this project's pom.xml, all parent POMs, a super-POM defined within Maven, user-defined settings, and active profiles. All projects ultimately extend the super-POM, which defines a set of sensible default configuration settings and which is fully explained in Chapter 9, The Project Object Model. While your project might have a relatively minimal pom.xml, the contents of your project's POM are interpolated with the contents of all parent POMs, user settings, and any active profiles. To see this "effective" POM, run the following command in the simple project's base directory.

$ mvn help:effective-pom

When you run this, you should see a much larger POM which exposes the default settings of Maven. This goal can come in handy if you are trying to debug a build and want to see how all of the current project's ancestor POMs are contributing to the effective POM.

No comments:

Post a Comment