Tuesday, January 16, 2007

Why Maven? (continued)

...A little more time has passed with Maven2. Here are more observations.
One of the added values I do see is that Maven2 generates a project site for you with links to the reports of the different goals executed. It's nice to have all of that in one place instead of having to roll your own. Perhaps there is a way to integrate just that part from an ant script?

Oh well, back to limitations that I've found. We've been integrating Maven2 with CruiseControl. So one of the first things we do is unit tests. Great Maven has a goal for that called "test"! Okay, so the first thing we want to do is do an update on the whole project then we want to create the database. Well there must be a Maven goal that does that. Dohhhh!! There isn't. Hmm maybe I can sneak it into one of the other build lifecycle phases via an ant script. Which one? not compile, not generate-source, hmm process-resources? Yeah but that's gonna launch a whole bunch of other stuff that I don't care about. I just want to create the database. And then maybe I want to insert some reference data, and then eventually drop it. It would be nice to do those independently. Yikes! Maven doesn't have these concepts in the build cycle. I guess it's back to ant for the db. That sucks I don't like having two build systems. The developers are already confused enough as it is. In fact when there's a bug the developers want to import the test data the QA team was using.
>mvn ?

...darn ...alright then

>ant db.import.testdata

ahhh, that works!!

The thing I'm getting at is how can a project "pre-define" all the requirements of a software team? It's risky business since things change. Now things are test-driven, agile, continuously integrated, etc... Tomorrow will offer other things. I don't want to wait for Maven to incorporate those concepts. I'd rather just take an ant script example and start from there. In fact Maven kind of feels like the whole heavy J2EE (EJB 1 & 2) where in trying to make something better (ant builds) they make it way too heavy and impose a way of doing things. Sounds familiar? It doesn't feel light and agile. I'm waiting for the backlash and going back to simple things like POA (Plain Old Ant).

2 Comments:

Anonymous brendan said...

Funny, I just ran into this same exact issue. I would prefer not to mix up the build process too much as well. I will let you know if I find a decent solution.

-bren

2:30 AM  
Blogger Lee said...

Thanks. I'm looking into it too. I'll repost if something comes up!

8:23 AM  

Post a Comment

Links to this post:

Create a Link

<< Home