...
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.
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 care.
What performance boost can be expected ?
This depends greatly on your module structure, but the following observations have been made:
- 20-40% 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
The functionality within the Maven3 core is thread safe and well behaved, but the maven ecosystem consists of a large number of subsystems, and a lot of plugins have a large number of dependencies. Not all of these plugins/libraries were written with thread safety in mind. As of beta-2 maven 3 will warn noisily of any plugins present in the build that are not @threadSafe.
The following plugins/settings are KNOWN to have incompatibilities when running any of the parallel modes:
...
There is a bug in plexus io that causes all the jar/war/ear plugins to intermittently fail with output on the form "Failed to retrieve numeric file attributes using: '/bin/sh -c "ls -1nlaR <a path>" (Maybe linux Linux/*Nix issue only; might be related to http://jira.codehaus.org/browse/PLXCOMP-122 ; may also be related to localization of linux)