Saturday, August 15, 2009

Apache Maven and Ivy

I went to a Canberra Java Users Group meeting on Wednesday night, where Glen Smith was giving a presentation on Apache Maven. I'd previously looked at Maven, and found it complex, confusing, poorly documented, and not really offering anything I wanted that Apache Ant didn't already do.

Anyway, apparently the documentation part of my complaint has been solved - Glen recommended the O'Reilly book on Maven - it's a free PDF download, and written by some core Maven people, due to the common complaint about the lack of decent documentation.

It did some cool things, but most of them are things which my Ant scripts do for us. The only thing it really did that I thought would be useful was automatic downloading of updated third party jars (think "yum update" every time you do an "ant build"). There's a plugin for Ant to do this (Apache Ivy - The concept is pretty cool - stops me from needing to go through our third party libs every now and then and updating them by hand, and drops the size of our subversion repository as well.

So I looked into this further. Ivy uses the Maven master repository as its default upstream repository for solving third party library dependencies. So I looked at the versions of some of the libraries we use:

  1. SWT - 3.0.1, last updated January 2007. We're using 3.5.0. Not much good.

  2. Apache FOP - 0.93, last updated May 2007. We're using 0.95. Not much good.

  3. Apache Struts - 1.2.9, last updated Jaunary 2007. Latest 1.x is 1.3.10, we're using 2.1.6. There is nothing in that repository for Struts 2.x at all! Not much good.

And so it goes on. It looks like a great framework for updating to packages that are at least two years out of date. (To be 100% honest, there are packages that are up to date; but looking down the list, the majority look to be years out of date).

Oh, the one thing Glen did say Maven was really good with was sharing code amongst multiple teams. You have your own Maven repository, and publish versions there, and other projects pull them down automatically when they build. That seems cool, but irrelevant if you aren't a large organisation with multiple development teams.

So it was an interesting presentation, and convinced me that I was right to ignore it for our purposes.

No comments: