Ivy
From Resin 3.0
(Difference between revisions)
Line 22: | Line 22: | ||
</project> | </project> | ||
− | </ | + | </pre></code> |
=== ivy.xml === | === ivy.xml === |
Revision as of 05:07, 15 February 2008
Contents |
Step by Step
- Download Ivy from http://ant.apache.org/ivy
- Install following the directions, i.e. copy the ivy jars to $ANT_HOME/lib, usually something like /opt/ant/lib or /usr/share/ant/lib
- Create a new project my-project and my-project/build.xml (see below for the build.xml)
- Create an ivy.xml dependencies file in my-project/ivy.xml
- Create an ivysettings.xml file in my-project/ivysettings.xml (to point to the Caucho repository)
The update task will download the Resin jars and their dependencies into my-project/lib.
build.xml
<project name="my-project" default="compile" basedir="."
xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="update">
<ivy:retrieve/>
</target>
</project>
ivy.xml
<ivy-module version="2.0">
<info organisation="com.foo" module="test"/>
<dependencies>
<dependency org="com.caucho" name="resin" rev="3.1.5"/>
</dependencies>
</ivy-module>
ivysettings.xml
<ivysettings>
<settings defaultResolver="default"/>
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
<resolvers>
<url name="caucho" m2compatible="true">
<ivy pattern="http://caucho.com/m2/com/caucho/[module]/[revision]/ivy-[revision].xml"/>
<artifact pattern="http://caucho.com/m2/com/caucho/[module]/[revision]/[artifact]-[revision].[ext]"/>
</url>
<chain name="default" returnFirst="true">
<resolver ref="local"/>
<resolver ref="main"/>
<resolver ref="caucho"/>
</chain>
</resolvers>
</ivysettings>