0

During non-parallel build aggregate POMs are built last provided there is no parent-child relationships between it and its submodules (correct me if I am wrong).

Is that preserved during parallel builds? Can I assume that root POM is built after all its submodules are built? According to the build logs, it seems like the answer is "no", but maybe I am missing something.

If answer is "no", how can I ensure that aggregate POM is built last? For example, I want to run assembly plugin after all submodules are built (in parallel build)? Of course, I can run separate "mvn -N assembly:assembly" command to assemble built stuff, but is there a way to do that during regular build?

Ivan Dubrov
  • 4,778
  • 2
  • 29
  • 41
  • There is nothing special in my POMs. Standard aggregator POM with a bunch of submodules. Submodules DO NOT inherit from aggregator POM. Assembly plugin configuration is in aggregator POM. – Ivan Dubrov Nov 15 '12 at 19:49

1 Answers1

0

If you like to make the order of builds predictable you need to define a multi-module build which contains dependencies between the module which will automatically resolved by maven and will correctly change the order in the reactor for building.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235