Ivy

From Resin 3.0

Revision as of 21:06, 14 February 2008 by Ferg (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Step by Step

  1. Download Ivy from http://ant.apache.org/ivy
  2. 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
  3. Create a new project my-project and my-project/build.xml (see below for the build.xml)
  4. Create an ivy.xml dependencies file in my-project/ivy.xml
  5. Create an ivysettings.xml file in my-project/ivysettings.xml (to point to the Caucho repository)

build.xml

<project name="my-project" default="compile" basedir="."
         xmlns:ivy="antlib:org.apache.ivy.ant">

  <target name="update">
    <ivy:retrieve/>
  </target>

</project>
</code>

ivy.xml

<code>
<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>
Personal tools