Gradle
  1. Gradle
  2. GRADLE-2214

Some dependencies are reported unresolved although they are present in the cache

    Details

    • Type: Bug Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.0-milestone-9
    • Fix Version/s: None

      Description

      Some dependencies are reported unresolved although they are present in the Gradle cache. If using "--refresh dependencies", the dependencies are resolved, although they are not fetched from the repository (Atrifactory) as can be seen by looking at the file date.

      If the command is reissued without "--refresh dependencies", it fails again. this does not concern all dependencies, only some of them

      Using version 1.0-milestone-8 produces the same result, but for fewer dependencies.

      This has began suddenly, and does not happen on all our computers. It happens sometimes, and sometimes, deleting the cache solves the problem, sometimes not.

      Using "--refresh dependencies" could be a workaround although not for us because we are using Eclipse Gradle import, with no possibility to use parameters.

        Activity

        Hide
        Pierre-Yves Saumont added a comment -

        After some experiments, it appears that the problem occurs with version milestone 8, milestone 9 and RC1, but the missing dependencies are not the same.

        Starting with a clean configuration, all is fine if using command line. Trying to import in Eclipse (using STS), some dependencies are reported missing although they are present in the cache.

        After this, using the command lien reports the same dependencies missing. using --refresh dependencies solves the problem, until project are imported again (or refreshed) in Eclipse, which make the dependencies to be reported missing again.

        It seems there are two different problems: 1) some dependencies wrongly reported as missing by the Eclipse import and 2) The information saying that the dependencies are missing seems to be cached by Gradle.

        Import into Eclipse is done without checking "Dependency management", and we are using resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' and resolutionStrategy.cacheChangingModulesFor 0, 'seconds'.

        Other users running version milestone 8 does not have the problem. Some have the problem and are able to fix it by clearing the Gradle cache. In some cases clearing the Gradle cache does not solve the problem.

        Show
        Pierre-Yves Saumont added a comment - After some experiments, it appears that the problem occurs with version milestone 8, milestone 9 and RC1, but the missing dependencies are not the same. Starting with a clean configuration, all is fine if using command line. Trying to import in Eclipse (using STS), some dependencies are reported missing although they are present in the cache. After this, using the command lien reports the same dependencies missing. using --refresh dependencies solves the problem, until project are imported again (or refreshed) in Eclipse, which make the dependencies to be reported missing again. It seems there are two different problems: 1) some dependencies wrongly reported as missing by the Eclipse import and 2) The information saying that the dependencies are missing seems to be cached by Gradle. Import into Eclipse is done without checking "Dependency management", and we are using resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' and resolutionStrategy.cacheChangingModulesFor 0, 'seconds'. Other users running version milestone 8 does not have the problem. Some have the problem and are able to fix it by clearing the Gradle cache. In some cases clearing the Gradle cache does not solve the problem.
        Hide
        Adam Murdoch added a comment -

        When you get a machine into the broken state, can you run:

        gradle dependencies --info
        gradle dependencies --refresh-dependencies --info
        

        and send in the resulting logs?

        Show
        Adam Murdoch added a comment - When you get a machine into the broken state, can you run: gradle dependencies --info gradle dependencies --refresh-dependencies --info and send in the resulting logs?
        Hide
        Ranga added a comment -

        Hi,

        Is there a fix for this yet. The issue still exists.
        I do gradle clean dependencies --refresh-dependencies build -x test

        I am using gradle 1.4

        Show
        Ranga added a comment - Hi, Is there a fix for this yet. The issue still exists. I do gradle clean dependencies --refresh-dependencies build -x test I am using gradle 1.4

          People

          • Assignee:
            Unassigned
            Reporter:
            Pierre-Yves Saumont
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development