Hi all, been working with a multi-module build that has the following
characteristics:
- All sub-modules have the parent pom as their parent
- I have Integration tests setup as their own module
- parent pom has profiles for specific environments setup

In the parent pom I have the a plugin bound to the prepare-package phase
and inherit marked to false (I only want the plugin to run once at the end
of the build, or once before another phase starts). The behavior I am
seeing though is this:
- Run mvn package -D profileName
- it executes my plugin at the top-level first
- Then it proceeds to compile and run the tests on each of the sub-modules
- It never runs my plugin again

What I expected to happen:
- Compile each sub-module
- Run the tests on each sub-module
- See the prepare-package at the root level (because it now hit that phase)
- Run package on each sub-module

I'm not clear as to why the build is doing all the phases within each
module rather than phase-first then module.

Is there an easy/clean way to do this?

The solution I have come up with so far is either
- turn inherit to true and it will run my plugin for each module (bad)
- Move my specific phase stuff into each module that may need it for each
profile (pain in the ass)

Other ideas?

-warner

Reply via email to