IT

Maven 3 vs Maven 2

I decided to compare Maven 3 (3.0.3) with Maven 2 ( 2.0.10).

A friend told me that it M3 is supposed to be faster than M2. Since I’m just starting a new project (Primefaces 2 / JSF 2 / Tomcat 6) for some remote administrative tasks that I need – I decided to switch from the good old maven 2 to maven 3 and see what happens.

Not changing the machine nor the pom.xml, it is indeed faster:

Maven 2 builds in 8 seconds:

------------------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------------------
Total time: 8 seconds
Finished at: Tue Apr 12 18:32:55 CEST 2011
Final Memory: 18M/33M
------------------------------------------------------------------------

Maven 3 builds in 6.20 seconds.

BUILD SUCCESS
------------------------------------------------------------------------
Total time: 6.190s
Finished at: Tue Apr 12 19:01:22 CEST 2011
Final Memory: 5M/15M
------------------------------------------------------------------------

As you can see, the memory used is half the size.

Me gusta 🙂

Machine is Intel Q9000, 4Gb DDRAM@800MHz, Intel X25m 80GB SSD hard disk.
Project is as basic as can get so that I can have a Tree populated with dummy data, JSF session bean hooked to a Spring service that, via mybatis, connects to an empty database to return … well, nothing.

War file is about 10Mb.

Friend was right, Maven 3 is faster, I’m keeping it.

Leave a Reply