tags:

views:

180

answers:

3

I have seen many ivy files in my application's build projects. What is Ivy, and its relation with ant?

+5  A: 

Ivy is an Ant extension for managing external libraries during the development process, giving you a way of adding them to your classpath, bundling them into your application build, etc.

There's some overlap with what Maven does, but Ivy is much more lightweight (and doesn't do as much).

skaffman
Ivy competes with Maven Ant Tasks (http://maven.apache.org/ant-tasks/index.html) but certainly not with Maven.
Pascal Thivent
To be fair, I didn't say it competed with it, I said there was overlap with it.
skaffman
Well, Ivy being an Ant port of Maven dependency handling mechanism, there is of course a kind of "overlap". But still, you can't compare them.
Pascal Thivent
+2  A: 

Ivy is a dependency manager -- it manages and controls the JAR files that your project depends on. If you don't have the JARs, it will pull them down for you by default (from the Maven 2 repository), which can make project setup a lot easier.

Kaleb Brasee
Except that most remote ivy/maven repos are horribly patchy and incomplete.
skaffman
@skaffman Facts please?
Pascal Thivent
@Pascal - my experience aligns with @skaffman's assertion. For example, when I started using Maven I had a lot of difficulty finding the "right" versions of the J2EE api JARs, and I gave up trying to find OAIcat. I've also run into problems with bad dependencies that require "excludes" workarounds. However, for me the benefits of Maven-style dependencies outweigh these problems.
Stephen C
@Stephen What time was that? The problem with Java/J2EE jars was more a licensing issue than anything else and has been solved for a long time now with the Java.net repository. Regarding bad metadata, any *recent* bad experience? And anyway, any serious corporate project should use a corporate repository and not rely on public things. So no, I do not agree.
Pascal Thivent
A: 

Ivy is originally a Jayasoft.fr product which at that time was under BSD license, however the core of Ivy has always been the same: It's a dependency management tool.

Ivy's relation to Ant is that it is an Ant extension in the sense that it is through Ant, however it doesn't really depend on it (beyond the obvious parts). Ivy was merged into an Apache project under Ant as subproject through incubation process on October 11, 2007.

Very common misconception people have is that they compare Ivy with Maven as a whole. However that doesn't really work since Ivy only handles dependencies in an agile manner and is very good at it with simplistic configuration and wide automated support with various build systems etc. through Ant while Maven really is a build system in itself. Personal opinions may and do differ in which one does what best and that is worth several Stackoverflow/Google searches on its own.

Esko