Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

As of Maven 3 beta 1, parallel builds are now added as an experimental feature in maven. The command is as follows:

...

This build-mode analyzes your project's dependency graph and schedules modules that can be built in parallel according to the dependency graph of your project.

Experimental feature for 3.

...

0!

The parallel build feature has been subject to extensive testing, but the maven ecosystem is diverse so there
will be undiscovered issues. We recommend that users of the parallel build feature establish their own
reference as to how well this works for their project, preferably starting with everyday builds as opposed to final production releases.

There is also an additional (more experimental mode) build mode called "Weave" mode that can be activated by appending a "W" to the commands above, as in -T 1CW. This builds the reactor phase-by-phase in dependency order instead of completing the full modules before proceeding to the next module(s). Your expected performance gain can vary quite dramatically according to your project structure/build architecture, and weave mode may not always be faster than regular parallel. Weave mode is still subject to changes, and may even be removed entirely.

Experimental feature in beta-version !

The use of beta-versions for production systems is generally discouraged. The parallel build functionality is brand new, and although they are tested with quite a few projects they do not have the general wisdom accumulated by running on multiple project types on multiple platforms within the community. So take a little care.

What performance boost can be expected ?

...

  • 20-50% speed improvement is quite common.
  • Distributing tests among your modules is likely to improve performance, putting all your tests in one module decreases it - unless you
    run one of the parallel surefire test providers.
  • Running tests in parallel within a single surefire-instance is a little different from running multiple surefire-runs (from separate projects),
    since there will be different classloaders. Remember that tcp/ip ports and files are still singletons.
  • For builds with evenly distributed tests (in the modules), weave mode has an advantage over parallel mode.
  • When running with -DskipTests, the difference between parallel and weave tends to be marginal.

Plugin/Settings compatibility

...