Dynamic POMs and dependencies

Usually, POMs are written as XML files. However, never forget that XML is a representation (written, and hierarchical) of an object data structure. POMs might have been written in YaML, or even as Java POJOs. The actual POM is not the pom.xml file, but the intelligent object behind, of which a projection is pom.xml. This is why there is nothing amazing that a POM can or cannot be isomorphic to the XML file representing it.

This brings us into concepts, advanced and non-intuitive, such as effective POM and dynamic POM. The same line of reasoning can be made for the settings.xml file.

Effective POM and settings

The POM that is actually executed by Maven is not the one a human being can write and read in the pom.xml file. ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.