I have seen many ivy files in my application's build projects. What is Ivy, and its relation with ant?
-
1http://ant.apache.org/ivy/features.html – Bozho Jan 02 '10 at 19:14
4 Answers
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).

- 398,947
- 96
- 818
- 769
-
Ivy competes with Maven Ant Tasks (http://maven.apache.org/ant-tasks/index.html) but certainly not with Maven. – Pascal Thivent Jan 02 '10 at 20:49
-
4To be fair, I didn't say it competed with it, I said there was overlap with it. – skaffman Jan 02 '10 at 20:57
-
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 Jan 03 '10 at 17:27
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.

- 51,193
- 8
- 108
- 113
-
Except that most remote ivy/maven repos are horribly patchy and incomplete. – skaffman Jan 02 '10 at 19:20
-
@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 Jan 03 '10 at 01:19
-
1@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 Jan 03 '10 at 08:49
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.

- 29,022
- 11
- 55
- 82
I believe these are significant and useful points to add:
- Ivy can be used standalone from command line without Ant. If your CI environment does not include Ant it will not preclude you from using Ivy. Yes, integration with Ant is nice and, by far, better documented. One could apply Ant integration documentation to standalone usage though.
- Ivy is not just for Java. My team successfully uses it to define dependencies for a fairly large .NET project (10 interdependent packages with several versions of each in production with multiple third party upstream dependencies). Works quite well. I wish documentation were a bit clearer and fuller.
- There are additional perks that Ivy offers for Build Time: upstream and downstream builds triggering.

- 574
- 4
- 13