Arnt Gulbrandsen
About meAbout this blog

Making Maven compile faster

jam -g is the best make system I've ever used. Best for the simple reason that when the build fails, it usually fails quickly. I start the build, and a second later I'm already looking at my mistake. That feature outweighs any and all drawbacks.

Sadly, I don't use jam very often at the moment. I mostly use maven 2, which starts the build by determining from first principles which source files to use and which libraries to download. In practice the set needed hasn't changed in the past minutes, and none of the pom.xml files have changed at all, but maven doesn't cache or do anything else that might lead to decent performance. So I start the build, lose patience, read some mail, and by the time the build fails or completes, I'm not looking.

Somehow I never read any blogs — except on days I use maven.

But now I've found a way to make maven compile very much faster. I simply start the build, pick the top piece of paper from the pile on my desk, file it properly, and all at once maven hands me some error messages or a finished build!