Max Did It
Coding
,Fri
Post the First Comment
Tagged ,

Inheriting From Ivy XML Files

I have now talked about how you can publish artifacts to your local repository and how Ivy resolves dependencies for your project.

As mentioned, Ivy uses the ivy.xml to know what files and libraries your project depends on. Ivy tries to retrieve these and will copy them into your project folder.

In another post, I have described how I keep my Ant build.xml files small and clean by putting targets I use often into central files. But not only build.xml files can contain information you need time and time again. Certain dependencies or Ivy settings might be used in many projects, and I don't want to copy them around, either.

Matryoshka Dolls

© 2012 Max Knoblich


Maven has parent POM files, which are pom.xml files you can inherit from. All settings, dependencies, plugins etc. from the parent POM are used and can be extended or overwritten. With this, you can create a hierarchy of build files that you can combine as needed.

Ivy has a similar mechanism, though it is not as refined as Maven's. Still, you can use it to put often used dependencies in "parent Ivy XMLs".

Read more...