Tuesday 15 March 2011

maven 3 - its time

After getting some weird issues with my builds I tried out maven 3 again to see if it magically fixed things. It didn't fix that issue, but I'm quite impressed with maven 3 so far:
  • It can build subprojects in parallel which gives me quite a performance boost.
  • The other big thing for me is that "lots of bugs are fixed now", which is a bit hard to measure right away but will probably ensure a more enjoyable experience.
Richard Kolb asked for some benchmarks so here they are. It is probably a lot more beneficial for my 17 module project to build it in parallel.
  • It was done on my Intel i7 Q749 @ 1.73GHz with SSD
  • The second run of each hopefully avoids delays while "checking for updates" 
  • Java version: 1.6.0_24
  • OS name: "linux" version: "2.6.35-27-generic" arch: "amd64" Family: "unix"
  • It includes a GWT widget compile 
  • Ran mvn clean install in the maven reactor with 17 subprojects
== Apache Maven 2.2.1 (rdebian-4) ==
4 minutes 15 seconds
3 minutes 18 seconds
3 minutes 22 seconds

== Apache Maven 3.0.3 (r1075438; 2011-02-28 19:31:09+0200) (serial) ==
3:34.911s
3:14.637s

=== apache-maven-3.0.3/bin/mvn -T6 clean install (using 6 threads) ===
2:23.427s
2:23.224s

=== apache-maven-3.0.3/bin/mvn -T6 clean install (using 8 threads) ===
2:22.137s
2:19.600s

so I save about a minute (or 28%) when runing thing in parallel

I had to upgrade some maven plugins to allow things to be treadsafe with the help of this page:
https://cwiki.apache.org/MAVEN/parallel-builds-in-maven-3.html