[GRADLE-2101] Dependency resolution incorrectly uses cached values from different repository Created: 14/Feb/12  Updated: 04/Jan/13  Resolved: 20/Feb/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-8
Fix Version/s: 1.0-milestone-8a

Type: Bug
Reporter: Daz DeBoer Assignee: Daz DeBoer
Resolution: Fixed Votes: 1

Issue Links:
Supercedes
Supercedes GRADLE-2100 Ordering of repository declarations c... Resolved

 Description   

Entries in the dependency resolution cache are stored against the unique id of a repository. So we cache the fact that we couldn't find module-X in repository XYZ. This means the next time we use repository XYZ, we don't need to check since we know that module-X is missing.

The bug is that repository ids are not being correctly calculated for maven/mavenRepo and ivy repositories. Only the name is being taken into account; if not specified a common default name will be used. This means that different builds with different repository declarations may share the same cache entries. A example symptom of this is when a module will appear to be missing from a declared repository, even though it is actually present in that repository. This would be due to the cache recording the module as missing from a repository with the same name, in a previous build.

The only workaround for this bug is to run the build with '--refresh dependencies' whenever you switch between build scripts, and to ensure that you always declare the same repositories in the same order within a single build (including the buildscript block).


Generated at Wed Jun 30 12:12:49 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.