I know it's mauvais ton to ask twice in a single day but here's another Maven puzzler:
I have a parent POM which defines 5 modules (5 subprojects). Since each module is executed in exactly the same way I pull <profile><build>
section into the parent POM to get rid of the duplicate code. Now - if I execute build individually from each module it works, however if I want to build all modules at once and move to the parent directory I got error since the very first thing Maven tries to execute is the parent project itself:
mvn package -P release
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] DWD Parent project
[INFO] Projects
After that build fails because exec plugin tries to execute something that is not there. Looking at the output it is pretty obvious that reactor plugin is driving the build but how can I configure reactor to skip the parent?
P.S. To prevent confusion - I'm trying to suppress profile execution on parent and enable it on child during the same
build