What does Maven offer in terms of parallelism to run builds ?
If I run a build on a machine with more than one processor , how can I take advantage of more resources for processing?
What is the expected performance improvement we can expect?
What does Maven offer in terms of parallelism to run builds ?
If I run a build on a machine with more than one processor , how can I take advantage of more resources for processing?
What is the expected performance improvement we can expect?
From Maven 3.x we can request that builds run with multiple threads.
How?
using the -T option [number of threads] we can define how many threads we want for the build, so we can determine how many threads per CPU
Examples
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
What is the expected performance improvement we can expect?
Well, this may vary depending on the structure of your projects, but the following evidence has been obtained:
Sources: