Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2352

Gradle dependencies refreshed whenever Eclipse starts

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.1.RELEASE, 3.6.4.RELEASE
    • Fix Version/s: 2.9.0.M2, 3.7.0.RELEASE
    • Component/s: GRADLE
    • Labels:
      None

      Description

      Whenever Eclipse starts, it happens very very often (but not always!) that the STS-Gradle integration refreshes the dependencies for at least some of the ~20 projects I have in the workspace.
      This is time consuming and IMHO useless: after a clean Eclipse shut-down, on the next start STS shouldn't refresh the dependencies, unless I tell it to do.

      While the Gradle build is in progress, I notice that, for those projects, the library containing the Gradle external dependencies is called "com.springsource.sts.gradle.classpathcontainer" instead of "Gradle Dependencies (persisted)". When the build completes, then the library name turns to "Gradle Dependencies".

      So, it seems like STS is not always persisting the Gradle Dependencies library configuration. Which is the criteria for this to occur?

      Real case example: I just started and closed Eclipse repeatedly for 4 times now, always on the same workspace, and:

      • the first three times, STS refreshed the dependencies of some of the projects at startup
      • the fourth time STS did not refresh the dependencies of any project

        Activity

        Hide
        Mauro Molinari added a comment -

        Hi Kris,
        I honestly don't know when/why this started to happen (also because meanwhile I changed my job and hence the projects I work on), but with the current workspaces I'm working on I'm seeing this problem again. What I see is that the Gradle Dependencies container is never marked with "(persisted)" and every time I start Eclipse that container is initialized and hence a full refresh and workspace build is triggered. I'm using Gradle IDE 3.6.4.201503050952-RELEASE. Any idea?

        Show
        Mauro Molinari added a comment - Hi Kris, I honestly don't know when/why this started to happen (also because meanwhile I changed my job and hence the projects I work on), but with the current workspaces I'm working on I'm seeing this problem again. What I see is that the Gradle Dependencies container is never marked with "(persisted)" and every time I start Eclipse that container is initialized and hence a full refresh and workspace build is triggered. I'm using Gradle IDE 3.6.4.201503050952-RELEASE. Any idea?
        Hide
        Kris De Volder (c) added a comment -

        Confirmed. I was able to reproduce. Debugging it now.

        Show
        Kris De Volder (c) added a comment - Confirmed. I was able to reproduce. Debugging it now.
        Hide
        Kris De Volder (c) added a comment -

        A slilly regression introduced by some work done to make classpath container model builds not block other jobs.
        Unfortunately I do not have regression test for this use case (hard to do automated test when the use-case requires a workspace restart).
        Should be fixed now, if you could try a snapshot once the build (https://build.spring.io/browse/IDE-GRADLE-41) finishes succesfully that would be great.

        Thanks Mauro for reporting this.

        Kris

        Show
        Kris De Volder (c) added a comment - A slilly regression introduced by some work done to make classpath container model builds not block other jobs. Unfortunately I do not have regression test for this use case (hard to do automated test when the use-case requires a workspace restart). Should be fixed now, if you could try a snapshot once the build ( https://build.spring.io/browse/IDE-GRADLE-41 ) finishes succesfully that would be great. Thanks Mauro for reporting this. Kris
        Hide
        Kris De Volder (c) added a comment -

        In case you didn't know the update site: http://dist.springsource.com/snapshot/TOOLS/gradle/nightly

        Show
        Kris De Volder (c) added a comment - In case you didn't know the update site: http://dist.springsource.com/snapshot/TOOLS/gradle/nightly
        Hide
        Mauro Molinari added a comment -

        First Eclipse restart after this build installation: dependencies not refresh, container marked as "(persisted)". So, I would say the fix works, thank you Kris!
        I'll let you know in case I find any other problem.

        Show
        Mauro Molinari added a comment - First Eclipse restart after this build installation: dependencies not refresh, container marked as "(persisted)". So, I would say the fix works, thank you Kris! I'll let you know in case I find any other problem.

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Mauro Molinari
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: