views:

2056

answers:

2

When you build with maven on a multicore / multi-CPU machine it would often be possible to build different subprojects in parallel. Is there a way to do this with maven? Is there a plugin for this / whatever?

Update: If you care about this you might want to vote for the corresponding maven JIRA entry to get fixed. You need to log in into JIRA for this.

+6  A: 

Some of the CI build applications (e.g. hudson) can build multiple maven projects at the same time (and even on multiple machines).

Support for this in maven 'standalone' would also be nice, a quick look through the maven issue tracker gave me: http://jira.codehaus.org/browse/MNG-3004

jor
I think the Hudson functionality for multiple maven projects at the same time is broken as is indicated in the MNG-3004 JIRA comments.
Dougnukem
+7  A: 

Maven 3 (as of beta 1) now supports parallel builds as an experimental feature.

For example,

mvn -T 4 clean install # Builds with 4 threads
mvn -T 1C clean install # 1 thread per cpu core
mvn -T 1.5C clean install # 1.5 thread per cpu core

Full documentation can be found on the Maven wiki.

https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3

hallidave