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

Clean up Grails install and version management

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0.M1
    • Fix Version/s: 3.5.0.RC1
    • Component/s: GRAILS
    • Labels:
      None

      Description

      A lot of problems stem from discrepancies between three places where Grails version and install infos are kept:

      • the grails install manager that maintains workspace configuration of installed Grailses and designates one
        install as the default install
      • project that use project specific Grails settings stored in Eclipse settings files.
      • application.properties which stores a Grails version number to be used by Grails itself.

      GrailsProjectVersionFixer is attempting to detect such problems when users are importing projects, or changing workspace configuration, or changing project specific settings.

      The number of branches and cases it is handling is growing out of hand and we are probably still missing some.

      It seems we could greatly simplify the situation by relying only on the application.properties file to determine which Grails version to use and then ask the install manager for a matching grails install. (We may need some 'fixer logic' if a matching install isn't found, but the number of problem cases is much more limited and straightforward)

      The default install would only be used when creating new applications. Imported applications would always rely on the version configured in application.properties.

      When user's change the grails install in the project's properties page we would run 'grails upgrade' with the requested Grails version in order to change application.properties.

      When user's change the Global default, we could still offer to upgrade/downgrade all the projects using that version.

        Activity

        Hide
        Kris De Volder (c) added a comment -

        This issue becomes more pressing as Grails 2.4 will likely remove/discontinue the 'upgrade' command.
        A lot of the current machinery will break because it uses that command.

        Show
        Kris De Volder (c) added a comment - This issue becomes more pressing as Grails 2.4 will likely remove/discontinue the 'upgrade' command. A lot of the current machinery will break because it uses that command.
        Hide
        Kris De Volder (c) added a comment - - edited

        DONE:

        • GrailsInstallManager.inheritsDefaultInstall obsolete: removed
        • GrailProjectVersion fixer... discontinue all scenarios that invoke 'upgrade' command.
        • org.grails.ide.eclipse.ui.internal.properties.GrailsInstallPropertyPage.IProjectInstallListener
        • deleted. Subsumed by resource listener on application.properties file.
        • project properties defining install removed
        • Grails project property page for choosing Grails install removed
        • Grails Run On Server project property page now a 'global' page (parent page became obsolete and removed).
        • GrailsProjectVersionFixerTest update to new behavior. Removed obsolete test cases.
        • GrailsOutputFolderFixer called from project version fixer... behavior preserved.
        • Refresh classpath container on version change.
        Show
        Kris De Volder (c) added a comment - - edited DONE: GrailsInstallManager.inheritsDefaultInstall obsolete: removed GrailProjectVersion fixer... discontinue all scenarios that invoke 'upgrade' command. org.grails.ide.eclipse.ui.internal.properties.GrailsInstallPropertyPage.IProjectInstallListener deleted. Subsumed by resource listener on application.properties file. project properties defining install removed Grails project property page for choosing Grails install removed Grails Run On Server project property page now a 'global' page (parent page became obsolete and removed). GrailsProjectVersionFixerTest update to new behavior. Removed obsolete test cases. GrailsOutputFolderFixer called from project version fixer... behavior preserved. Refresh classpath container on version change.
        Hide
        Kris De Volder (c) added a comment -

        This is done.
        Just waiting on a succesfull test build before merging changes from branch to master and closing issue.

        Show
        Kris De Volder (c) added a comment - This is done. Just waiting on a succesfull test build before merging changes from branch to master and closing issue.
        Hide
        Kris De Volder (c) added a comment -

        Tests green, branch merged. Closing.

        Show
        Kris De Volder (c) added a comment - Tests green, branch merged. Closing.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: