I'm working on a project in Maven and I'm trying to understand where certain settings are coming from in the effective pom. I want to trace backwards, so I can figure out which pom files need changing. I have modified my parent pom, my settings.xml file, and any other pom that seems to play a part, but the settings I want changed persist in the effective pom.
Is there a way to see where sections of the effective-pom come from? Or, can I at least see the "dependency" chain, if you will, of pom files that go into the effective pom?
Essentially I have a similar problem as this question: How to remove repositories from Effective POM but if there is a way to trace backwards that would really help me out.
Thanks!
This answer describes the various parts that create the effective POM.
You may try a variation of this answer to view the POM hierarchy (what you called the "dependency" chain). Add this config to the parent POM's
<build><plugins>
section (temporarily?) to see it.(Note, in pure Groovy the log.info lines above could be written as
Groovy calls these
GString
s. I know the gmaven plugin handles GStrings a little differently than plain Groovy but don't have time to look up the details right now so used regular string concatenation in the example.)