pache.org/ivy/">Ivy is a free java based dependency manager.
This class is the main class of Ivy, which acts as a Facade to all services offered by Ivy:
- resolve dependencies
- retrieve artifacts to a local location
- deliver and publish modules
- repository search and listing
Here is one typical usage:
Ivy ivy = Ivy.newInstance(); ivy.configure(new URL("ivysettings.xml")); ivy.resolve(new URL("ivy.xml"));
Using Ivy engines directly
If the methods offered by the {@link Ivy} class are not flexible enough and you want to use Ivyengines directly, you need to call the methods within a single {@link IvyContext} associated tothe {@link Ivy} instance you use.
To do so, it is recommended to use the {@link #execute(org.apache.ivy.Ivy.IvyCallback)} methodlike this:
Ivy ivy = Ivy.newInstance(); ivy.execute(new IvyCallback() { public Object doInIvyContext(Ivy ivy, IvyContext context) { // obviously we can use regular Ivy methods in the callback ivy.configure(new URL("ivysettings.xml")); // and we can safely use Ivy engines too ivy.getResolveEngine().resolve(new URL("ivy.xml")); return null; } });