Ivy is everything Maven should have/could have been 2.5 years ago

I’ve been working with an ant-based dependency management tool called Ivy:
http://www.jayasoft.fr/org/modules/ivy/overview.php

We’ve been talking about restructuring the Spring Framework source layout at some point relatively soon (although it almost certainly won’t happen for 1.2), so that the individual components of Spring each have their own source level projects, instead of living under one big fat project with a fairly adhoc ant script building everything, and knowing about jar dependencies. This is something that’s actually not going to affect most Spring users in any way, but it’s going to make our lives easier as we add more code and more logical modules.

Any such move requires (in my opinion) the use of some dependency management tool or library, as it’s way to much work to maintain dependencies by hand in the ant scripts, in terms of dependencies between modules, or between code and various external jars.

Naturally, you’d think, Maven! I actually drank the Maven Koolaid pretty heavily about 2-3 years ago, spending pretty much time trying to use it in a big multi-project application, and hoping it would solve my build needs at a higher level than ant, before giving up for a while to let it mature. Well, after 3 years of development, Maven still does not support transitive closures of dependencies, so that if Project A depends on B, and B depends on C, when you want to build/package A, you don’t have to specifically add in C’s dependencies. To me this has always seemed to be the no-brainer, biggest value add feature Maven could have offered. It’s pretty easy to manage dependencies manually in an ant build for one single project, but it gets complex between multiple projects, and here Maven falls down. In the meantime, they’ve been putzin’ around with any number of other semi-useful plugins, instead of adding this vital capability. I know the mythical Maven 2 is supposed to support transitive dependencies, but there’s no sight of it.

So the point of this is that I’ve been using Ivy, and it’s sweet. All it does is let you declare dependencies between code, modules, and different configurations of those modules (think buildtime vs. runtime vs. deployed as a webapp, for example), and then move around jars correspondingly, including pulling them down from iBiblio or a filesystem location as needed. It doesn’t make a shiny web site, or polish your shoes, or even handle the build itself (you still have to do that), but frankly, handling dependencies in an intelligent fashion is my main concern, and where I think a great deal of the complexity in multi-project builds comes from.

Give it a try.

(added 2005-3-10 17:42): of course I realize that Maven does a lot more than handle dependencies. But when I said “2.5 years ago”, I was trying to say that Maven choose (in my opinion) some of the wrong problems to tackle first. Transitive dependencies are just so important to multi-project builds that it’s just inconceivable that after 3 years of development a there is no released version of Maven which supports them.

 

WordPress database error: [Can't open file: 'colins_comments.MYI' (errno: 145)]
SELECT * FROM colins_comments WHERE comment_post_ID = '21' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply