Gradle
  1. Gradle
  2. GRADLE-2101

Dependency resolution incorrectly uses cached values from different repository

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0-milestone-8
    • Fix Version/s: 1.0-milestone-8a

      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).

        Issue Links

          Activity

          Daz DeBoer
          made changes -
          Field Original Value New Value
          Link This issue Supercedes GRADLE-2100 [ GRADLE-2100 ]
          Pivotal Tracker Integration
          made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Adam Murdoch
          made changes -
          Fix Version/s 1.0-milestone-8a [ 10260 ]
          Fix Version/s 1.0-milestone-9 [ 10161 ]
          Peter Niederwieser
          made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Pivotal Tracker Integration
          made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Pivotal Tracker Integration
          made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Pivotal Tracker Integration
          made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Peter Niederwieser
          made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Pivotal Tracker Integration
          made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Pivotal Tracker Integration
          made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Pivotal Tracker Integration
          made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Luke Daley
          made changes -
          Workflow jira with pivotal tracker [ 15288 ] jira with pivotal tracker (no resolved, only closed) [ 17483 ]
          Luke Daley
          made changes -
          Workflow jira with pivotal tracker (no resolved, only closed) [ 17483 ] Copy of jira with pivotal tracker (no closed, only resolved) [ 20140 ]
          Status Closed [ 6 ] Resolved [ 5 ]

            People

            • Assignee:
              Daz DeBoer
              Reporter:
              Daz DeBoer
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: