7

I have read that to build multiple Maven projects in one step (with automatic building of dependencies) the Maven reactor plugin can be used. However, all the examples I have seen show that in order to use this plugin, the interdependent packages are modules of a common parent project.

Is it possible to use maven to build multiple projects in one step which are not modules of a common parent project?

For example - two projects from different repositories, one project depends on another, and I want to make local changes to both projects and build everything in one step. Can I do this?

James
  • 3,597
  • 2
  • 39
  • 38

1 Answers1

10

Is it possible to use maven to build multiple projects in one step which are not modules of a common parent project?

No, you need a aggregating project i.e. a project listing them as modules (and the sub-modules don't have to inherit from the aggregating project).

Florian Wolters
  • 3,820
  • 5
  • 35
  • 55
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
  • 1
    I believe this answer is not that accurate. In Maven, Aggregating (aka Multi-Module project) is not necessary to be Parent project – Adrian Shum Aug 02 '10 at 04:13
  • 2
    @Adrian Hmm... Maybe I was not clear enough but that's not what I meant. I only meant that for a reactor build, you need an aggregating project (listing the modules). – Pascal Thivent Aug 02 '10 at 04:34
  • That sonatype.com link is broken. – Phil Aug 23 '17 at 04:19