title: ivy doesn't download jar from remote after local
body: <p>I configured ivy to go first maven local repo then remote. But something is going wrong! (By the way, im working with snapshots)</p>
  
  <ol>
  <li>If ivy cache doesn't exist, ivy first checks maven local repo and then remote to get required jars. Everything is fine.</li>
  <li>If ivy cache exists, ivy just checks local repo! It doesn't check remote! I have 2 problem here:
  <ul>
  <li>If I change something in maven project and install it to local repo of maven, ivy still gets the jar from its cache, not in local repo of maven. </li>
  <li>Even worse, it doesn't get any jar in remote if requsted jars in ivy cache.</li>
  </ul></li>
  </ol>
  
  <h3>ivysettings.xml</h3>
  
  <pre><code>&lt;ivysettings&gt;
    &lt;settings defaultResolver="chain_resolver"/&gt;
  
    &lt;credentials host="localhost"
                 realm="Sonatype Nexus Repository Manager"
                 username="username" passwd="password"/&gt;
  
    &lt;property name="nexus.repo" value="url here"/&gt;
    &lt;property name="nexus-public" value="http://${nexus.repo}:8081/nexus/content/groups/public"/&gt;
    &lt;property name="m2-pattern"   value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"/&gt;
  
    &lt;resolvers&gt;
      &lt;chain name="chain_resolver"&gt;
        &lt;ibiblio name="nexus" m2compatible="true" root="${nexus-public}"/&gt;
        &lt;filesystem name="local" m2compatible="true"&gt;
          &lt;artifact pattern="${m2-pattern}"/&gt;
          &lt;ivy pattern="${m2-pattern}"/&gt;
        &lt;/filesystem&gt;
      &lt;/chain&gt;
    &lt;/resolvers&gt;
  
  &lt;/ivysettings&gt;
  </code></pre>
  
  <h3>Related ant tasks</h3>
  
  <pre><code>&lt;target name="ivy-download" unless="offline"&gt;
      &lt;mkdir dir="${ivy.dir}"/&gt;
      &lt;get src="${repo_public}/org/apache/ivy/ivy/${ivy.ver}/ivy-${ivy.ver}.jar" dest="${ivy.jar}" usetimestamp="true"/&gt;
    &lt;/target&gt;
  
    &lt;target name="ivy-install" depends="ivy-download"&gt;
      &lt;path id="ivy.lib.path"&gt;
        &lt;fileset file="${ivy.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;ivy:settings file="ivysettings.xml" /&gt;
    &lt;/target&gt;
  
    &lt;target name="lib.get"&gt;
      &lt;mkdir dir="${lib.dir}"/&gt;
      &lt;ivy:retrieve type="jar" conf="lib" pattern="${lib.dir}/[artifact]-[revision].[ext]"/&gt;
    &lt;/target&gt;
  
    &lt;target name="ivy.lib.get" depends="ivy-install" if="${skipClean}"&gt;
        &lt;antcall target="lib.get" /&gt;
      &lt;/target&gt;
  
    &lt;target name="ivy.clean.lib.get" depends="ivy-install" unless="${skipClean}"&gt;
      &lt;ivy:cleancache/&gt;
      &lt;antcall target="lib.get" /&gt;
    &lt;/target&gt;
  </code></pre>
  
  <p>How can I check</p>
  
  <ul>
  <li>First, local repo and if there is a change, download from local repo</li>
  <li>Then, remote and if there is a change, download from remote</li>
  </ul>
  
  <p>And there is one more possible situation here which is, if there is a change in remote and local at the same time, what should I do?</p>