Gradle downloads changing modules every build when using an ivy DependencyResolver


#1

If you specify a repository using an Ivy DependencyResolver, and set the cacheChangingModules timeout to zero, then for a SNAPSHOT module, the descriptor file (ivy.xml/pom.xml) and artifact files will be re-downloaded on every build.

eg: This will result in *-SNAPSHOT.pom/.jar being re-downloaded every build.

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
    add(new org.apache.ivy.plugins.resolver.URLResolver()) {
        name = "repo"
        addIvyPattern("http://localhost:${server.port}/repo/[organization]/ivy-[module]-[revision].xml")
        addArtifactPattern("http://localhost:${server.port}/repo/[organization]/[module]-[revision].[ext]")
        changingMatcher = 'regexp'
        changingPattern = '.*SNAPSHOT.*'
    }
}

#2

This is GRADLE-2141