title: Why isn't Ivy downloading an artifact from our intranet repo?
body: <p>I've had a prototype Ivy build working reasonably well.  I just looked at it today and I'm seeing that it's finding an artifact on my intranet repo but not downloading it to the local cache or retrieving it in my local build, which causes the build to fail.</p>
  
  <p>The build specifies several other dependencies, most of which are found on mavencentral, and one in another repo in the same local intranet repo that it's finding (but not downloading) the other artifact.</p>
  
  <p>I've tried a few times to clear out the ivy cache and run this again, but it downloads all of the artifacts except for this particular one.</p>
  
  <p>First, here is the relevant output from the build, with some minor pieces elided:</p>
  
  <pre><code>install-dependencies:
  :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
  :: loading settings :: file = &lt;pathtoivysettingsxmlfile&gt;
  :: resolving dependencies :: com.att.ecom.poc#coherence_poc;working@&lt;hostname&gt; [not transitive]
      confs: [default]
      found com.att.ecom.poc#poc-domain-model;0.0.1-SNAPSHOT in mavenCentralSnapshots
      found org.apache.commons#commons-lang3;3.1 in central
      found org.springframework#spring-aop;4.0.0.RELEASE in central
      found org.springframework#spring-beans;4.0.0.RELEASE in central
      found org.springframework#spring-context;4.0.0.RELEASE in central
      found org.springframework#spring-core;4.0.0.RELEASE in central
      found org.springframework#spring-expression;4.0.0.RELEASE in central
      found org.springframework#spring-web;4.0.0.RELEASE in central
      found com.oracle.coherence#coherence;12.1.2-0-0 in mavenCentralThirdparty
  :: resolution report :: resolve 351ms :: artifacts dl 8ms
      ---------------------------------------------------------------------
      |                  |            modules            ||   artifacts   |
      |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
      ---------------------------------------------------------------------
      |      default     |   9   |   0   |   0   |   0   ||   8   |   0   |
      ---------------------------------------------------------------------
  :: retrieving :: com.att.ecom.poc#coherence_poc
      confs: [default]
      0 artifacts copied, 8 already retrieved (0kB/5ms)
  </code></pre>
  
  <p>The repositories "mavenCentralSnapshots" and "mavenCentralThirdparty" are actually on our local intranet repo (which is also confusedly called "maven central").</p>
  
  <p>Notice that it says there are 9 modules, but only 8 were downloaded.  The first artifact in the list, "poc-domain-model" is the one that is not being downloaded, but I don't see why.</p>
  
  <p>Here is my "ivysettings.xml" file:</p>
  
  <pre><code>&lt;ivysettings&gt;
      &lt;settings defaultResolver="default"/&gt;
      &lt;property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" /&gt;
      &lt;resolvers&gt;
          &lt;chain name="default"&gt;
              &lt;filesystem name="local-maven2" m2compatible="true" &gt;
                  &lt;artifact pattern="${m2-pattern}"/&gt;
                  &lt;ivy pattern="${m2-pattern}"/&gt;
              &lt;/filesystem&gt;
              &lt;ibiblio name="mavenCentralSnapshots" m2compatible="true"
               root="http://&lt;hostandport&gt;/nexus/content/repositories/cditspoc-snapshots"/&gt;
              &lt;ibiblio name="mavenCentralThirdparty" m2compatible="true"
               root="http://&lt;hostandport&gt;/nexus/content/repositories/cditspoc-3rd-party"/&gt;
              &lt;ibiblio name="central" m2compatible="true"/&gt;
          &lt;/chain&gt;
      &lt;/resolvers&gt;
  &lt;/ivysettings&gt;
  </code></pre>
  
  <p>And here is my "ivy.xml":</p>
  
  <pre><code>&lt;ivy-module version="2.0"&gt;
    &lt;info organisation="com.att.ecom.poc" module="coherence_poc"/&gt;
    &lt;dependencies&gt;
      &lt;dependency org="com.att.ecom.poc" name="poc-domain-model" rev="0.0.1-SNAPSHOT"/&gt;
      &lt;dependency org="org.apache.commons" name="commons-lang3" rev="3.1"/&gt;
      &lt;dependency org="org.springframework" name="spring-aop" rev="4.0.0.RELEASE"/&gt;
      &lt;dependency org="org.springframework" name="spring-beans" rev="4.0.0.RELEASE"/&gt;
      &lt;dependency org="org.springframework" name="spring-context" rev="4.0.0.RELEASE"/&gt;
      &lt;dependency org="org.springframework" name="spring-core" rev="4.0.0.RELEASE"/&gt;
      &lt;dependency org="org.springframework" name="spring-expression" rev="4.0.0.RELEASE"/&gt;
      &lt;dependency org="org.springframework" name="spring-web" rev="4.0.0.RELEASE"/&gt;
      &lt;dependency org="com.oracle.coherence" name="coherence" rev="12.1.2-0-0"/&gt;
    &lt;/dependencies&gt;
  &lt;/ivy-module&gt;
  </code></pre>
  
  <p>And finally, here's the excerpt from my build.xml that calls Ivy:</p>
  
  <pre><code>&lt;target name="install-dependencies"&gt;
    &lt;ivy:resolve transitive="false" type="jar"/&gt;
    &lt;ivy:retrieve conf="*" type="jar" pattern="${basedir}/lib/[artifact]-[type]-[revision].[ext]"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Is it obvious what my problem is, or is there something I can do to get more information?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Here is an elided version of my "com.att.ecom.poc-coherence_poc-default.xml" file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?xml-stylesheet type="text/xsl" href="ivy-report.xsl"?&gt;
  &lt;ivy-report version="1.0"&gt;
      &lt;info
          organisation="com.att.ecom.poc"
          module="coherence_poc"
          revision="working@&lt;hostname&gt;"
          conf="default"
          confs="default"
          date="20140210084517"/&gt;
      &lt;dependencies&gt;
          &lt;module organisation="com.oracle.coherence" name="coherence"&gt;
              &lt;revision name="12.1.2-0-0" status="release" pubdate="20131118143843" resolver="mavenCentralThirdparty" artresolver="mavenCentralThirdparty" homepage="" downloaded="false" searched="false" default="false" conf="system, default, optional, compile, *, provided, runtime, javadoc, sources, master" position="8"&gt;
                  &lt;metadata-artifact status="no" details="" size="2283" time="0" location="&lt;homedir&gt;\.ivy2\cache\com.oracle.coherence\coherence\ivy-12.1.2-0-0.xml" searched="false" origin-is-local="false" origin-location="&lt;intranetmavenrepo&gt;/nexus/content/repositories/cditspoc-3rd-party/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom"/&gt;
                  &lt;caller organisation="com.att.ecom.poc" name="coherence_poc" conf="default" rev="12.1.2-0-0" rev-constraint-default="12.1.2-0-0" rev-constraint-dynamic="12.1.2-0-0" callerrev="working@&lt;hostname&gt;"/&gt;
                  &lt;artifacts&gt;
                      &lt;artifact name="coherence" type="jar" ext="jar" status="no" details="" size="7027491" time="0" location="&lt;homedir&gt;\.ivy2\cache\com.oracle.coherence\coherence\jars\coherence-12.1.2-0-0.jar"&gt;
                          &lt;origin-location is-local="false" location="&lt;intranetmavenrepo&gt;/nexus/content/repositories/cditspoc-3rd-party/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.jar"/&gt;
                      &lt;/artifact&gt;
                  &lt;/artifacts&gt;
              &lt;/revision&gt;
          &lt;/module&gt;
          &lt;module organisation="org.springframework" name="spring-web"&gt;
              &lt;revision name="4.0.0.RELEASE" status="release" pubdate="20131211234952" resolver="central" artresolver="central" homepage="https://github.com/SpringSource/spring-framework" downloaded="false" searched="false" default="false" conf="system, default, optional, compile, *, provided, runtime, javadoc, sources, master" position="7"&gt;
                  &lt;license name="The Apache Software License, Version 2.0" url="http://www.apache.org/licenses/LICENSE-2.0.txt"/&gt;
                  &lt;metadata-artifact status="no" details="" size="5998" time="0" location="&lt;homedir&gt;\.ivy2\cache\org.springframework\spring-web\ivy-4.0.0.RELEASE.xml" searched="false" origin-is-local="false" origin-location="http://repo1.maven.org/maven2/org/springframework/spring-web/4.0.0.RELEASE/spring-web-4.0.0.RELEASE.pom"/&gt;
                  &lt;caller organisation="com.att.ecom.poc" name="coherence_poc" conf="default" rev="4.0.0.RELEASE" rev-constraint-default="4.0.0.RELEASE" rev-constraint-dynamic="4.0.0.RELEASE" callerrev="working@&lt;hostname&gt;"/&gt;
                  &lt;artifacts&gt;
                      &lt;artifact name="spring-web" type="jar" ext="jar" status="no" details="" size="661567" time="0" location="&lt;homedir&gt;\.ivy2\cache\org.springframework\spring-web\jars\spring-web-4.0.0.RELEASE.jar"&gt;
                          &lt;origin-location is-local="false" location="http://repo1.maven.org/maven2/org/springframework/spring-web/4.0.0.RELEASE/spring-web-4.0.0.RELEASE.jar"/&gt;
                      &lt;/artifact&gt;
                  &lt;/artifacts&gt;
              &lt;/revision&gt;
          &lt;/module&gt;
  ... several other spring and commons artifacts resolved from central
          &lt;module organisation="com.att.ecom.poc" name="poc-domain-model"&gt;
              &lt;revision name="0.0.1-SNAPSHOT" status="integration" pubdate="20140207093019" resolver="mavenCentralSnapshots" artresolver="mavenCentralSnapshots" homepage="" downloaded="false" searched="false" default="false" conf="system, default, optional, compile, *, provided, runtime, javadoc, sources, master" position="0"&gt;
                  &lt;metadata-artifact status="no" details="" size="3337" time="0" location="&lt;homedir&gt;\.ivy2\cache\com.att.ecom.poc\poc-domain-model\ivy-0.0.1-SNAPSHOT.xml" searched="false" origin-is-local="false" origin-location="&lt;intranetmavenrepo&gt;/nexus/content/repositories/cditspoc-snapshots/com/att/ecom/poc/poc-domain-model/0.0.1-SNAPSHOT/poc-domain-model-0.0.1-20140207.173018-85.pom"/&gt;
                  &lt;caller organisation="com.att.ecom.poc" name="coherence_poc" conf="default" rev="0.0.1-SNAPSHOT" rev-constraint-default="0.0.1-SNAPSHOT" rev-constraint-dynamic="0.0.1-SNAPSHOT" callerrev="working@&lt;hostname&gt;"/&gt;
                  &lt;artifacts&gt;
                  &lt;/artifacts&gt;
              &lt;/revision&gt;
          &lt;/module&gt;
      &lt;/dependencies&gt;
  &lt;/ivy-report&gt;
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>I finally noticed that the download fails because the exact fully-qualified path doesn't exist on the intranet repo.  It's looking for a file with "SNAPSHOT" in the name, but the files in the directory only have timestamps, not "SNAPSHOT".</p>
  
  <p>I noticed the following discussion, which seems relevant: <a href="https://stackoverflow.com/questions/2399099/resolving-snapshot-dependencies-with-timestamps-from-ivy">enter link description here</a> .</p>
  
  <p>As a result of this, I modified by "ivysettings.xml" to the following slightly elided version:</p>
  
  <pre><code>&lt;ivysettings&gt;
  &lt;settings defaultResolver="default"/&gt;
  &lt;property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" /&gt;
  &lt;resolvers&gt;
      &lt;chain name="default"&gt;
      &lt;filesystem name="local-maven2" m2compatible="true" &gt;
          &lt;artifact pattern="${m2-pattern}"/&gt;
          &lt;ivy pattern="${m2-pattern}"/&gt;
      &lt;/filesystem&gt;
      &lt;ibiblio name="mavenCentralSnapshots" m2compatible="true"
           root="http://&lt;hostandport&gt;/nexus/content/repositories/cditspoc-snapshots"
           pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/&gt;
      &lt;ibiblio name="mavenCentralThirdparty" m2compatible="true"
           root="http://&lt;hostandport&gt;/nexus/content/repositories/cditspoc-3rd-party"/&gt;
      &lt;ibiblio name="central" m2compatible="true"/&gt;
      &lt;/chain&gt;
  &lt;/resolvers&gt;
  &lt;/ivysettings&gt;
  </code></pre>
  
  <p>Unfortunately, this made no difference, it still just tries to find the "SNAPSHOT" file, which doesn't exist.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Actually, I realized another extremely important detail in that error where it fails to find the SNAPSHOT artifact on our MavenCentral.  Here's the actual excerpt from the output:</p>
  
  <pre><code>:: problems summary ::
  :::: WARNINGS
          [FAILED     ] com.att.ecom.poc#poc-domain-model;0.0.1-SNAPSHOT!poc-domain-model.jar(bundle):  (0ms)
  
      ==== shared: tried
  
        C:\Users\dk068x\.ivy2\shared\com.att.ecom.poc\poc-domain-model\0.0.1-SNAPSHOT\bundles\poc-domain-model.jar
  
      ==== public: tried
  
        http://repo1.maven.org/maven2/com/att/ecom/poc/poc-domain-model/0.0.1-SNAPSHOT/poc-domain-model-0.0.1-SNAPSHOT.jar
  </code></pre>
  
  <p>What I should have noticed from this is that it isn't even trying to get the artifact from my snapshot repository at all.  It's failing to find it on the public mavencentral, not mine.  That tells me there's something wrong with my "ivysettings.xml", but I don't know what it would be.</p>