Tag Archives: reactor

Reactor: My New Favourite Maven Plugin

Dan recently put together a great new plugin to manipulate the Maven reactor, currently being voted on for release.

It has a few goals:

  • reactor:resume – pick up where a previous build left off
  • reactor:make / make-dependents – make a project and its dependencies or those that depend on it
  • reactor:make-scm-changes – make any projects that have uncommitted changes and their dependencies

This is particularly useful for building a subset of modules during development to reduce the time of a build. While it is a good practice to break down your build into a structure that might reflect common build scenarios, this will be useful in plenty of circumstances.

Think about the 10 minute build that fails with a missing dependency about 9 minutes in, but still with 5 modules to build. You don’t want to build it all again, and you don’t want to build 5 modules manually. Now, you just fix the dependency problem (say, by adding a new proxy/artifact to your locked down repository manager), then run mvn reactor:resume -Dfrom=module-that-failed. Simple!

As I mentioned in an earlier post, this same functionality is intended to be built natively into the final Maven 2.1.0 release (with some exceptions) – keep an eye out for it!