Install Ivy
wget http://apache.ntu.edu.tw/ant/ivy/2.1.0/apache-ivy-2.1.0-bin.tar.gz tar zxvf apache-ivy-2.1.0-bin.tar.gz cd apache-ivy-2.1.0 sudo cp ivy-2.1.0.jar /usr/share/ant/lib cd src/example/hello-ivy ant -verbose
Example ivy.xml
<ivy version="2.0"> <info organisation="mistasy" module="IvyDemo" /> <dependencies> <dependency org="org.slf4j" name="slf4j-api" rev="1.5.8" /> <dependency org="ch.qos.logback" name="logback-core" rev="0.9.17" /> <dependency org="ch.qos.logback" name="logback-classic" rev="0.9.17" /> </dependencies> </ivy-module>
Ivy mapping to Maven
- groudId=>org
- artifactId=>name
- version=>rev
<dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.17</version> </dependency>
Ivy with eclipse
see: IvyDE
Using sun’s java.net maven repository
see: this article
Introduction
Terminology
- organisation – like “org.apache“, “ibm“, etc.
- module – chain of revisions each has a descriptor(ivy.xml) and one or more artifacts.
- artifact – like “ant-1.7.0-bin.zip“, “apache-ant-1.7.0-src.tar.gz“, etc.
- type(of an artifact) – like “jar“, “bin“, “source“, etc.
- extension – like “.jar“, etc.
- revision – revision of module(not source).
- status(of a revision) – like “integration“, “milestone” and “release“.
- configuration(of a module) – distinct dependency-sets.
Patterns
It includes: [organisation] , [module] , [branch] , [revision] , [artifact] , [type] , [ext](extension), [conf](configuration) , [originalname].
About pattern of retrieve task
Here is a very clear explanation:
Ivy files do not define any such concept as “filename”.
Instead, they define artifacts. Artifacts have the following attributes:
- Module organisation
- Module name
- Module revision
- Artifact name
- Artifact type
- Artifact extension
The only thing guaranteed to be unique for an artifact is the combination of all of the above attributes (and that guarantee only applies within a single repository).