Maven vs. Ant and deployment strategies…

I had an interesting discussion with a couple of developers from one major insurance company where I was working as an external consultant.
Discussion was about Maven usage. They have by-the-book maven development environment – Archiva maven repository, Continuum continuous build and Maven plugin for Eclipse. It all works pretty well.

Until you want to add a new library.

A guy who likes Maven comes and says: “Maven is much better then Ant, because it gives you better control over libraries”. But when it comes to adding a new library, then he spends half an hour configuring Archiva, Continuum, calling other colleague to help him with deployment etc.

There is another guy who dislikes Maven because he cannot convert web project to Eclipse WTP so he could debug in Tomcat instead of deploying everything to WebSphere. But he said he found a tool in Google Code called m2wtp which you can use exactly for this purpose.

Hmm, I am not an expert on Maven, but what is wrong with using plain old Ant?
There are so many tools/frameworks today that we developers need to learn, last thing we want to waste our time on is with build tool. And they did waste quite a lot of time in deploying just one jar file. Even if you master that and include new library in Maven quite quickly, I see another bigger problem. Often in projects I like to experiment with different libraries to try to find a tool that best fit my needs. If I have to deploy every test library to Maven repository just to be able to see how it works and then remove it again, I am sure I would eventually end up in a mental hospital. Plus, I don’t want everybody else to see how I experiment with different libraries. With Maven, they see it.

I am an old fashioned Ant fan and quite frankly I don’t see anything wrong with that. My machine is my space. I can include what ever I want and play around with it. When I see that code works fine, I can send it to SVN repository. One of my preferred working environments is like this:
local machine -> test server -> preproduction server -> production server.
Every developer works on his local machine and plays with the code. Tester checks out code from SVN and deploys it to test server where testing team does their part. Integrator deploys code from test server to preproduction server where final functional/performance/integration tests are performed. If all is well, we go live.

For me this is all the control in the world that we need. Controlling jars (what Maven is doing) is just a small and first step that is actually hurting developers because it influences their everyday work.

Again, I must say that I am not Maven expert and maybe all these things can be done differently. I just wrote what I saw in that company which has quite a large IT department and I guess people who know how to configure Maven. Even then, build should be easy and straightforward process not blocker and time waster. There are other places were we should waste our time and loose our hair.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s