Thursday, January 31, 2008

Maven: Do you use it? Still?

Sometime ago Howard Lewis Ship has posted a critique article about Maven builds. I am fully agree with him. I use Maven based build on one of my projects for 1.5 years now. It is a REAL PAIN. A year ago a was so disappointed by it that I had wanted to write a slashing article. But I've abstained. Now I see that my problems are not unique. So I want to add my 2 grams of lead mostly due the comments on the Howard's article.

There are three things those make Maven an bad choice for build tool:

1. Lack of discipline in developers team
Yes, I said it. All other problems are just consequences of this. There is no any release plans, configuration management and communication with customers.

As result, you shall find yorself using SNAPSHOT versions of plugins so explicit version numbers will not work. You need to establish an own controlled repository.

2. Convention over configuration principle
Yes, I am a heretic. I think conventions do not work good enough for large projects. Just because you need account too many of them.

Maven works good for simple projects, where artifact structure is planar. But it become a real mess to manage 3-4 level hierarchy of projects inside one build.

Another bad thing with conventions is easy modification. The Maven dev team can do a small change, and your build will be broken. Actually, the change may even be a bugfix. But you are in trouble anyway. It may pass sometime before one of your team members install Maven with a difference in patch level and the build will stop working for him.

3. Buggy implementation
There is no any software without errors. This is like an axiom in our days. But in the Maven's case bugs are a real problem. Mostly because of lack of appropriate release policy. Some issues stay unresolved for years.

Now, it is unrecommended practice to use Maven for builds inside my company. All new projects use Ivy together with internal Maven repository now. As I can see developers are much happier with it.