Marty Andrews

artful code

Tuesday, February 17, 2004

CI Demo Part 3 - Maven Build

At the Sydney Geek Night this week, I spent spent some time with Mike Cannon-Brookes putting a Maven build on my template application. Ok, I just sat back and watched while Mike did his thing, but in any case, I learned a bit about Maven.

The biggest eye-opener for me was the slashing and burning Mike did on the default script. The conversation kind of went like this:

Mike: "Ok, so lets grab this sample script off the documentation as a starting point. This section here is pointless, so we'll get rid of that. You don't need this bit here either. We'll throw away this crap as well..."

Me: "Whats the deal with all these reports here?"

Mike: "Oh yeah - most of those are irrelevant, so we'll get rid of these ones"

Within a few minutes, we had a working build up. It took a while to run the first few goals, because it downloaded a bunch of jars get started. Once it was done though, it did almost the same thing as my Ant build but with much less time spent on development.

Some instinctive reactions to my first Maven build:

  • My Maven build file is about 30 lines long versus about 130 lines for my Ant build file. Nice...
  • When I look at my Maven build file, I can't tell what things I can run on my build. Not so nice...
  • My Ant build uses a patched jcoverage.jar file. So far it seems like it might take more moving parts to get Maven to do that.
  • My Ant build takes about 7 seconds. My Maven build takes about 15 seconds (but that includes site generation).

I like the setup enough to keep looking into it, but I'm no convert yet...

No comments:

Post a Comment