Saturday, 23 December 2017

What is Ivy? Installing Ivy on Eclipse

What is Ivy?
Apache Ivy is a dependency manager. Or to put it elaborately, Ivy is a dependency manager (basically an Ant extension) to manage external libraries in an agile manner during development.

Benefits of using Ivy:
  • Suppose you want to use some external Java library during development and you end up adding all the resources as external JARs. (In eclipse you can manually add external JARs to your project by right-clicking on the project in project explorer --> build path --> configure build path... --> go to libraries Tab and click on 'Add External JARs'). Note that before adding these external JARs you need to go to the painstaking task of downloading them.
    • And in the case when you decide to use some other version of existing external library, you again need to go and download and manually add the JARs. This is no doubt, a clumsy and error-prone task.
  • Suppose the JARs that you download have transitive dependencies, you will have to go and manually add all the libraries which are missing and repeat this process forever until all the dependencies are resolved transitively. Apache Ivy helps us in resolving transitive dependencies with no pain.
  • Suppose you want to add your project on GitHub and someone else clones the project for reference, he/she will not get all the external libraries that your project is dependent on and will end up adding all the dependencies. This is horrible. Ivy lets you specify the dependencies and downloads it for you automatically at a click. :)
 And this list goes on. See this for more details.

But I think these points are enough to make you feel trying your hands on Ivy.

Installing Ivy plugin on eclipse
This is very simple. Go to Help --> Install new Software --> click on Add button
Name: IvyDE
Click OK.

IvDE will install after this and you will be prompted to restart eclipse.

No comments:

Post a Comment