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

Avoid writing the timestamp when creating (or at least updating...) com.springsource.sts.gradle.core.prefs and com.springsource.sts.gradle.core.import.prefs

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0.M2
    • Fix Version/s: 2.9.0.M1
    • Component/s: GRADLE
    • Labels:
      None

      Description

      Assume you have a Gradle multiproject and that it is under version control.
      Suppose this project is already an Eclipse project and all the Eclipse metadata files (.project, .classpath, .settings folder, etc.) are under version control.
      You check it out in a folder and then use the STS Gradle Import Wizard to import in a new repository.
      Suppose you UNCHECK all the following: run before, run after and create resource filters.
      You do that because you know that all the necessary data are already there, because the whole thing is under version control: so, you just want to "mount" the main project and all the subprojects into the workspace. (note: ideally, you may use the standard Import Existing Project into workspace, but you can't because the main project, which is at the root of the Gradle multiproject, is hiding the subprojects).

      After the import process has finished, even if you chose not to do anything special, you'll see some outgoing changes in the workspace:

      • .settings/com.springsource.sts.gradle.core.prefs for all the subprojects: they have outgoing changes because the import wizard changes the timestamp in the first line of the file, with the import time
      • .settings/com.springsource.sts.gradle.core.import.prefs of the main project: same problem as above, the timestamp is updated
      • .classpath of the main project: the order of the classpath entries is not predictable (I'll open a new issue for this)

      So, my request is: avoid to change the timestamp in the prefs files (is the timestamp needed at all?) when you import the projects. Or, at least, avoid to change it if no changes to the prefs file is actually needed.

        Activity

        Hide
        Mauro Molinari added a comment -

        Maybe it would be "nicer", or at least more "standard"...
        If I could choose, I would prefer your last solution, anyway do what you feel is better

        Thank you!

        Show
        Mauro Molinari added a comment - Maybe it would be "nicer", or at least more "standard"... If I could choose, I would prefer your last solution, anyway do what you feel is better Thank you!
        Hide
        Mauro Molinari added a comment -

        Hi Kris,
        just to be sure: what's the state on this? Did you decide to go for the .settings/gradle/<blah>.prefs solution? Is it already available in the latest nightly builds?

        Show
        Mauro Molinari added a comment - Hi Kris, just to be sure: what's the state on this? Did you decide to go for the .settings/gradle/<blah>.prefs solution? Is it already available in the latest nightly builds?
        Hide
        Kris De Volder (c) added a comment -

        I think I will, (assuming it works). But haven't gotten round to it yet.

        Show
        Kris De Volder (c) added a comment - I think I will, (assuming it works). But haven't gotten round to it yet.
        Hide
        Kris De Volder (c) added a comment -

        OK, I just committed a change, settings files are now under .settings/gradle/<blah>.prefs

        You'll need to wait for a succesfull nightly build, so probably tomorrow it should be on the update site.

        I haven't added any code to cleanup the .gradle-sts-settings. I figure it isn't worth it since no version was ever really officially released yet that uses that location. So you'll have to delete or move those files manually.

        Show
        Kris De Volder (c) added a comment - OK, I just committed a change, settings files are now under .settings/gradle/<blah>.prefs You'll need to wait for a succesfull nightly build, so probably tomorrow it should be on the update site. I haven't added any code to cleanup the .gradle-sts-settings. I figure it isn't worth it since no version was ever really officially released yet that uses that location. So you'll have to delete or move those files manually.
        Hide
        Mauro Molinari added a comment -

        Thank you Kris!

        Show
        Mauro Molinari added a comment - Thank you Kris!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: