I checked around, and couldn't find a good answer to this:
We have a multi-module Maven project which we want to continuously integrate. We thought of two strategies for handling this:
Is there a standard, preferred practice for this? I've checked Stack Overflow, Google, the Continuous Integration book, and did not find anything, but maybe I missed it.
The main benefit of Continuous Integration is the ability to flag errors as they are introduced into a system instead of waiting multiple days for test failures and critical errors to be identified during the QA cycle.
A multi-module project is built from an aggregator POM that manages a group of submodules. In most cases, the aggregator is located in the project's root directory and must have packaging of type pom. The submodules are regular Maven projects, and they can be built separately or through the aggregator POM.
Standard practice with Hudson, at least, is your first option. For one thing, in maven, your build may not work very well if all the projects are not in the reactor together. For another, trying to make them separate builds is going to put you in snapshot-management heck. If one in the middle changes, and you try to build just it, maven will go looking for its dependencies as snapshots. What it gets will depend on the order in which other projects build, and whether you publish snapshots.
If you have so many projects, or such unrelated projects, that building them all is a problem, then I suggest that you need to consider dis-aggregation. Make the parent a separate, released, project, give each of them (or each subgroup of them) a Trunk/Tags/Branches structure, and make them depend on releases, not snapshots.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With