Tuesday, July 4, 2017

Faster Maven builds - Put your CPU to real work

Whenever a process takes too long I lose my concentration and drifts elsewhere. It could be a long compilation, or a long running test. Things should complete shorter.
Here's a great post on making your maven go faster. I especially liked the "-T 1C" multi-threaded switch as I like knowing that my well paid for CPUs cores are kept busy.

My unscientific benchmark for a mvn clean install on a big monolith, w/o running tests:
Without "-T 1C" - Total time: 06:02 min
With "-T 1C"    - Total time: 03:15 min

For example:
mvn  -T 1C clean install -f parent/pom.xml -DskipTests=true -Duser.timezone=UTC


Go fast!