Friday, August 21, 2009

Speed up your maven build

Imagine a company having 10 modules each depending on the other. Lets say building it would take 15 minutes using maven.
So the team would spend roughly in a day - (noOfBuildTimesPerDay x 15 minutes) x developerCount. This is bad.
Some options : "mvn clean install" is good for small/medium sized projects but not for bigger ones. Trade-off between time and space is always there. When space is not a major constraint , we can gain time by "mvn clean install -Dmaven.compile.fork=true -Dmaven.junit.jvmargs=-Xmx512m -Dmaven.junit.fork=true" With mvn clean, delete on windows is slower, instead if we rename it could boost the build time. http://bosy.dailydev.org/2009/02/speed-up-your-maven-build-four-times.html This cut the build time by around 30% on my PC. Thats an improvement isnt it.
I think it would be a big improvement if maven can reuse the classes generated by
eclipse. Also having an exploded war deployment is an option to reduce pack and unpack times.

No comments: