Extending Ivy

Many things are configurable in Ivy, and many things are available with Ivy core. But when you want to do something not built in Ivy core, you can still plug your own code.

Many things are pluggable in Ivy:

  • module descriptor parsers

  • dependency resolvers

  • lock strategies

  • latest strategies

  • circular dependency strategies

  • conflict managers

  • report outputters

  • version matchers

  • triggers

Before trying to implement your own, we encourage you to check if the solution to your problem can be addressed by existing features, or by contributed ones. Do not hesitate to ask for help on the mailing-lists.

If you still don’t find what you need, then you’ll have to develop your own plugin or find someone who could do that for you.

All Ivy plug-ins use the same code patterns as Ant specific tasks for parameters. This means that if you want to have a myattribute of type String, you just have to declare a method called setMyattribute(String val) on your plug-in. The same applies to child tags, you just have to follow Ant specifications.

All pluggable code in Ivy is located in the org.apache.ivy.plugins package. In each package you will find an interface that you must implement to provide a new plugin. We usually also provide an abstract class easing the implementation and making your code more independent of interface changes. We heavily recommend using these abstract classes as a base class.

To understand how your implementation can be done, we suggest looking at existing implementations we provide, it’s the best way to get started.