title: How to get dependency with Ivy
body: <p>I am in the process of reviewing the use of Ivy in our application.  I have set up a simple configuration to pull down cobertura.</p>
  
  <pre><code>&lt;ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"&gt;
      &lt;info
          organisation="com"
          module="adesa"
          status="integration"&gt;
      &lt;/info&gt;
      &lt;configurations&gt;
          &lt;conf name="runtime" description=""/&gt;
      &lt;/configurations&gt;
      &lt;dependencies&gt;
        &lt;dependency org="cobertura" name="cobertura" rev="1.8" transitive="true"/&gt;
      &lt;/dependencies&gt; 
  &lt;/ivy-module&gt;
  </code></pre>
  
  <p>I know that cobertura has dependencies on other jar files.  So how does one get those other jar files?  The only thing that I see in my cache directory is the cobertura jar file.</p>
  
  <p>Here is my ivysetting.xml</p>
  
  <pre><code>&lt;ivysettings&gt;
  &lt;settings defaultResolver="chained" /&gt;
  &lt;resolvers&gt;
      &lt;chain name="chained" returnFirst="true"&gt; 
          &lt;url name="apache" m2compatible="true"&gt; 
              &lt;!--Apache --&gt;
              &lt;artifact pattern="http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /&gt;
              &lt;artifact pattern="http://people.apache.org/repo/m2-incubating-repository/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /&gt;
          &lt;/url&gt;
          &lt;url name="jboss" m2compatible="true"&gt;  
              &lt;!-- JBoss --&gt;
              &lt;artifact pattern="http://repository.jboss.com/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" /&gt;
          &lt;/url&gt;
  
          &lt;ibiblio name="ibiblio" m2compatible="true" /&gt; 
          &lt;url name="mvnrepos" m2compatible="true"&gt;
              &lt;!-- IBIBLIO-Mirror --&gt;
              &lt;artifact pattern="http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[module]/[branch]/[revision]/[branch]-[revision].[ext]" /&gt;
          &lt;/url&gt;
      &lt;/chain&gt; 
  &lt;/resolvers&gt; 
  </code></pre>
  
  <p></p>
  
  <p>Are there list of other repositories that can be used to get dependencies/jars?</p>
  
  <hr>
  
  <p>Snippet from the build.xml file:</p>
  
  <pre><code>    &lt;target name="load-ivy"&gt;
      &lt;path id="ivy.lib.path"&gt;
          &lt;fileset dir="${basedir}/lib" includes="*.jar"/&gt;
      &lt;/path&gt;
      &lt;taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/&gt;
  &lt;/target&gt;
  
  &lt;target name="ivy-init" depends="load-ivy"&gt;
      &lt;mkdir dir="${dest.repo.dir}"/&gt;
      &lt;ivy:settings id="basic.settings" file="${basedir}/ivysettings.xml"/&gt;
  &lt;/target&gt;
  
  &lt;target name="ivy-clean" depends="ivy-init"&gt;
      &lt;ivy:cleancache settingsRef="basic.settings"/&gt;
      &lt;delete dir="${ivy.cache.dir}" failonerror="true"  /&gt;
      &lt;delete dir="${dest.repo.dir}"/&gt;
  &lt;/target&gt;
  
  
  &lt;target name="ivy-download" depends="ivy-clean,ivy-init"&gt;
      &lt;ivy:retrieve  settingsRef="basic.settings" pattern="${dest.repo.dir}/[artifact]/[artifact]-[revision].[ext]" /&gt;
  &lt;/target&gt;
  
  &lt;target name="ivy-report" depends="ivy-download"&gt;
      &lt;ivy:report  settingsRef="basic.settings" todir="${basedir}/logs" /&gt;
  &lt;/target&gt;
  </code></pre>