开发者

what is ivy? and how it is related to ant?

开发者 https://www.devze.com 2022-12-15 02:24 出处:网络
I have seen many ivy files in my application\'s开发者_StackOverflow中文版 build projects. What is Ivy, and its relation with ant?Ivy is an Ant extension for managing external libraries during the deve

I have seen many ivy files in my application's开发者_StackOverflow中文版 build projects. What is Ivy, and its relation with ant?


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


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.


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.


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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号