I’m having a problem where Gradle (1.9) seems to be using an ivy.xml file from .gradle/caches/modules-2/metadata-2.1/descriptors/… for a changing dependency instead of the latest pom from the repository. The ivy.xml file in the cache is a couple of weeks old and doesn’t include recently added dependencies (which is how I know it’s being used and how I discovered this).
I’m not using Ivy with Gradle. Instead we run our own Nexus repository which is the only repository configured for this build.
I’ve run with --refresh-dependencies but still the old ivy.xml file is used.
I have no ivy configuration for the main project of the stale dependency (which I also manage) so I imagine Gradle is creating the ivy.xml file for it’s own purposes but I can’t find any documentation to confirm this. There are no ivy.xml files in my repository. Still, gradle claims “Ivy file found for module ‘io.aviso#core-services;1.2-SNAPSHOT’ in repository ‘annadale’.”
What am I missing here?
Here is the relevant debug output: 15:28:38.286 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: HEAD /nexus/content/groups/public/io/aviso/core-services/1.2-SNAPSHOT/core-services-1.2-20131218.115939-38.pom HTTP/1.1 15:28:38.286 [DEBUG] [org.apache.http.headers] >> HEAD /nexus/content/groups/public/io/aviso/core-services/1.2-SNAPSHOT/core-services-1.2-20131218.115939-38.pom HTTP/1.1 15:28:38.287 [DEBUG] [org.apache.http.headers] >> Accept-Encoding: gzip,deflate 15:28:38.287 [DEBUG] [org.apache.http.headers] >> Host: mvn.annadaletech.com 15:28:38.287 [DEBUG] [org.apache.http.headers] >> Connection: Keep-Alive 15:28:38.287 [DEBUG] [org.apache.http.headers] >> User-Agent: Gradle/1.9 (Linux;3.2.0-39-generic;amd64) (Oracle Corporation;1.7.0_17;23.7-b01) 15:28:38.292 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 200 OK 15:28:38.293 [DEBUG] [org.apache.http.headers] << HTTP/1.1 200 OK 15:28:38.293 [DEBUG] [org.apache.http.headers] << Date: Wed, 18 Dec 2013 15:28:38 GMT 15:28:38.293 [DEBUG] [org.apache.http.headers] << Server: Noelios-Restlet-Engine/1.1.6-SONATYPE-5348-V8 15:28:38.293 [DEBUG] [org.apache.http.headers] << Content-Type: application/xml 15:28:38.293 [DEBUG] [org.apache.http.headers] << Last-Modified: Wed, 18 Dec 2013 11:59:39 GMT 15:28:38.294 [DEBUG] [org.apache.http.headers] << ETag: “{SHA1{8c08a5145a425b6fbe045f6bd211e547d5fec078}}” 15:28:38.294 [DEBUG] [org.apache.http.headers] << Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept 15:28:38.294 [DEBUG] [org.apache.http.headers] << X-Content-Type-Options: nosniff 15:28:38.294 [DEBUG] [org.apache.http.headers] << Content-Length: 1325 15:28:38.295 [DEBUG] [org.apache.http.headers] << Set-Cookie: rememberMe=deleteMe; Path=/nexus; Max-Age=0; Expires=Tue, 17-Dec-2013 15:28:38 GMT 15:28:38.295 [DEBUG] [org.apache.http.headers] << Keep-Alive: timeout=5, max=60 15:28:38.295 [DEBUG] [org.apache.http.headers] << Connection: Keep-Alive 15:28:38.296 [DEBUG] [org.apache.http.client.protocol.ResponseProcessCookies] Cookie accepted: “[version: 0][name: rememberMe][value: deleteMe][domain: mvn.annadaletech.com][path: /nexus][expiry: Wed Dec 18 15: 28:38 GMT 2013]”. 15:28:38.296 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Connection can be kept alive for 5000 MILLISECONDS 15:28:38.296 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection [id: 1][route: {s}->https://mvn.annadaletech.com] can be kept alive for 5000 MILLISECONDS 15:28:38.297 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection released: [id: 1][route: {s}->https://mvn.annadaletech.com][total kept alive: 1; route allocated: 1 of 5; total allocat ed: 1 of 10] 15:28:38.297 [INFO] [org.gradle.api.internal.externalresource.transfer.DefaultCacheAwareExternalResourceAccessor] Cached resource is up-to-date (lastModified: Wed Dec 18 11:59:39 GMT 2013). [HTTP: https://mvn.a nnadaletech.com/nexus/content/groups/public/io/aviso/core-services/1.2-SNAPSHOT/core-services-1.2-20131218.115939-38.pom] 15:28:38.298 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Downloading https://mvn.annadaletech.com/nexus/content/groups/public/io/aviso/core-services/1.2-SNAPSHOT/c ore-services-1.2-20131218.115939-38.pom to /tmp/gradle_download2352952749938498612bin 15:28:38.303 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Ivy file found for module ‘io.aviso#core-services;1.2-SNAPSHOT’ in repository ‘annadale’. 15:28:38.303 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleMetaDataCache] Recording module descriptor in cache: io.aviso#core-services;1.2-SNAPSHOT [changing = true] 15:28:38.304 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain] Using module ‘io.aviso:core-services:1.2-SNAPSHOT’ from repository ‘annadale’