Archive for October 1st, 2007

My personal tipping point for Maven

Monday, October 1st, 2007

I have always resisted using anything other than ANT to build my Java projects. I mean, if ANT can do the job and everyone else already has it, why do I need to learn anything else, right? However, Maven2 has finally reached the tipping point for me last week.

First, the Seam team has officially made Seam builds with all its dependencies available from a Maven repository. Seam has been using Maven to manage its own builds for quite sometime now. But the new Maven support makes it easy for developers to set up Seam application projects in Maven — it is now quite easy to make sure that all 3rd party JARs you use in your application are the ones tested by the Seam team.

Second, Netbeans 6.0 released a beta, which boasts Maven project support. You can now open Maven project directories directly in Netbeans, and have all the source/resources/test packages listed in the project browser with all the correct classpaths. Okay, you still need to install the Mavenide plugin. As a long time Netbeans user, I found it reassuring to see that the Netbeans team is committed to bring first class Maven support to the IDE.

Last and most important, the R&D team at eZee has decided to use Maven to manage our internal projects. The rationale is that since we are starting brand new projects, we are not chained to legacy ANT scripts. We have an opportunity to start fresh from Maven. Why not try it? Even if Maven does not work out, we still have an opportunity to convert the projects to ANT — but we will all learn a lot of the exercise.

So, how do I like Maven after a week of using it in real life? I have to say that I really liked it. Maven takes a very structured approach to build management. It is not as flexible as ANT. For most “standard” project types, Maven just supports them out of the box — there is no build script to write — just put your code and configuration files in the right default directories and you are ready to go. Speaking of “configuration by convention!” However, if you want to do anything not supported by default, you have to write code to plug into pre-defined integration points in Maven.

Maven really reminds me a lot about JSF — it does not allow you to do random scriptlets like JSP, but it provides integration points where you can heavily customize the behavior of the system. Sure, it is more work to create code that conforms to the “framework”. But you also get more stability and maintainability out of it. I am hoping that Maven can allow me to achieve the same!