- Documentation (trunk)
- Release Notes
- Settings Files
- Ivy Files
- Ant Tasks
- post resolve tasks
- Using standalone
- Developer doc
since 2.4 The fixdeps task serializes transitively resolved dependencies into an ivy.xml file.
The dependencies declared in an ivy.xml can be specified as range of revisions. And the transitive dependencies too. As new versions of modules can be added to the repository anytime, resolved versions of ranges can change over time. It is then safer to resolve a range once and stick with the resolved revision. This way a resolve process is highly reproductible.
It is especially useful in a very dynamic environment like the OSGi one.
In a multi project environment some dependencies still need to be maintained loose: the one between the projects. These dependencies, as soon as they are declared in the original ivy.xml, can be kept from being fixed. In order to do so, use the inner element keep.
The recommended setup is then to:
- have an ivy-spec.xml in your project which specifies the dependencies, with ranges if needed
- have an Ant target which resolve the ivy-spec.xml and call fixdeps to generate an ivy.xml. This target should then only be called after ivy-spec.xml is modified. The generated ivy.xml can safely be shared in a version control repository (svn, git,...).
- make the entire build workflow based on the resolve of the generated ivy.xml
|tofile||The location of the ivy file to generate||Yes|
|keep||declares a dependency to keep from being fixed, and keep its original declaration from the original ivy.xml
These elements takes two attributes:
<ivy:fixdeps tofile="ivy-fixed.xml" />Simple fix of some dependencies.
<ivy:fixdeps tofile="ivy-fixed.xml">Fix of the dependencies but keep the dependency on com.acme#mymodule as defined in the original ivy.xml.
<keep org="com.acme" module="mymodule" />