Search code examples
mavenearpom.xml

How to make Maven pick-up modules of EAR automatically from the filesystem?


What I'd like to have is a parent pom.xml at the root of the project sources importing child pom.xml files "on-demand". Is it achievable using Maven? Say if some other team member creates a new module and puts a child pom.xml in it, then on system build the parent pom.xml imports the child one automatically (without prior modifications done to the parent pom.xml).


Solution

  • No, it doesn't work like this. There is no "automatic" discovery of new modules in multi-module projects. You will need to define the relationship between the child and parent poms in the parent pom.