what is ivy? and how it is related to ant?
Asked Answered
A

4

28

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

Alyworth answered 2/1, 2010 at 19:10 Comment(1)
ant.apache.org/ivy/features.htmlSocialminded
L
25

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).

Lowelllowenstein answered 2/1, 2010 at 19:13 Comment(3)
Ivy competes with Maven Ant Tasks (maven.apache.org/ant-tasks/index.html) but certainly not with Maven.Eboat
To be fair, I didn't say it competed with it, I said there was overlap with it.Lowelllowenstein
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.Eboat
J
9

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.

Jerkwater answered 2/1, 2010 at 19:13 Comment(3)
Except that most remote ivy/maven repos are horribly patchy and incomplete.Lowelllowenstein
@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.Lemmueu
@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.Eboat
J
8

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.

Jakob answered 2/1, 2010 at 20:6 Comment(0)
W
5

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.
Weaponry answered 8/7, 2011 at 15:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.