Maven Rambling

Morning train ride is always a nice ride for me as I start fresh and my mind is ready for another jam packed action, so I fired up my laptop and was reading one of the article I’ve opened on my browser tab. The title was Maven: Throwing Out the Bath Water, Keeping the Baby. The article touches about the pain of Maven and how Howard (the article’s author) have gone through the process of using Maven as a dependencies management tool and relies onĀ  Ant to do the build process, while leveraging Ruby creating a script to create a .classpath file for Eclipse. I can understand where Howard is coming from and the pain he is trying to address but he should be looking it at a different perspective. He is thinking of “creating” something that have been addressed by other developer which for him is *NOT* a total waste of time but for other *NORMAL* developer who works in an organization as one of the business unit it it a *WASTE* of time.

I’ve been through this kind of exercise before migrating out 70+ projects (combinations of JARS,EARS and WARS) that need to be build and deployed at the same time in different environment. In it’s previous incarnation the build process was done using combination of Ant + Maven 1 and it was very painful to maintain so we decided that we want to spend time to do it “the right way”. Granted there are no single solution to do this but we have identified 3 key requirements:

  1. The tool should be an open source tools and have been in the development space for few years (this way we can be sure that the tool is mature enough)
  2. Worked on constantly by the good people on the ‘net
  3. Strong community and easy to find examples on the ‘net

After evaluating our options we went for Maven 2.x as it fulfills all the above criteria and we get the ‘GO’ vote from all the developers. So off I went to the Maven 2 journey. Along the way we did encounter few things that were stumbling blocks but there were always the workaround and the lessons that I got out of it was:

  1. Invest time in researching the tools properly and learn how to use it in a ‘best practise’ way and make sure everbody follows it
  2. In terms of Maven 2 understand the process properly as internally there are things that are going on under the hood that you need to understand properly before using it to it’s maximum potential.
  3. Dig through the source code if hit something there will *ALWAYS” a work around, never say it’s not possible or it’s hard (if it is hard I recommend you get a job in a non-IT field)
  4. Bear in mind that there is no such thing as *PERFECT TOOL* it doesn’t exist, it only exist in your imagination. Make do with the limitation and try to extend if you can.

Not that I’m saying Maven 2 doesn’t has it’s drawback and limitation as a tools but it covered 80% of what most people need, same goes with Ant or even Make tool. Sometimes we need to sit down and try to use the tool as it’s supposed to be used, don’t try to circumvent things and at the end it’s making your life difficult and at the end you complain that it doesn’t work.

1 Comment so far

  1. mkyong on November 7th, 2009

    Maven is “so far” the best project management tool in Java. At least i do not see any other similar tools exists.

Leave a reply