Skip to content
Latchkey

mvn help:effective-pom: Usage & Common CI Errors

See the real, fully-merged POM Maven actually builds with.

help:effective-pom is a goal of the maven-help-plugin that displays the effective POM - the project model after parent inheritance, active profiles, and built-in defaults are all merged. It is the definitive way to see what configuration Maven is really using.

What it does

effective-pom resolves the full model and prints the merged XML, including inherited plugin configuration and managed versions you never wrote directly. Pair it with help:active-profiles to see which profiles contributed.

Common usage

Terminal
mvn help:effective-pom
mvn help:effective-pom -Doutput=effective-pom.xml
mvn help:effective-pom -Pci          # with the ci profile active
mvn help:active-profiles

Common error in CI (and the fix)

Symptom: a plugin behaves differently in CI than locally for "no reason". Cause: a profile activated by environment, JDK, or property (or a settings.xml difference) changes the effective POM only in CI. Fix: run mvn help:effective-pom -Doutput=… on the CI agent and diff it against local, and run help:active-profiles to confirm which profiles the CI environment silently activated.

Using this in CI

  • Set the shell explicitly and enable set -euo pipefail; the default runner shell does not stop on the first error inside a multi-line block.
  • Pin the tool version. An unpinned build tool turns a runner image update into a build break on unchanged code.
  • Prefer non-interactive and batch flags. Progress output designed for a terminal bloats CI logs and can hang without a TTY.
  • Write machine-readable output (JSON, JUnit) to a file and upload it as an artifact, so a failure is diagnosable without re-running the job.

Frequently asked questions

mvn help:effective-pom: Usage & Common CI Errors?
help:effective-pom is a goal of the maven-help-plugin that displays the effective POM - the project model after parent inheritance, active profiles, and built-in defaults are all merged. It is the definitive way to see what configuration Maven is really using.
What it does?
effective-pom resolves the full model and prints the merged XML, including inherited plugin configuration and managed versions you never wrote directly. Pair it with help:active-profiles to see which profiles contributed.
Common error in CI (and the fix)?
Symptom: a plugin behaves differently in CI than locally for "no reason". Cause: a profile activated by environment, JDK, or property (or a settings.xml difference) changes the effective POM only in CI.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card