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

Updating more than one plugin from Grails plugin manager is very long-winded

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.5.0.M3
    • Fix Version/s: 2.5.0.RC1
    • Component/s: None
    • Labels:
      None

      Description

      If a user selects more than one plugin to update from the Grails Plugin Manager, the process of upgrading them is very long-winded:

      1. The user must first confirm the upgrade of a plugin
      2. Then STS updates the Grails dependencies
      3. Finally the workspace is rebuilt

      This sequence is done for every plugin the user wants to update. One option would be to simply put the new version numbers in application.properties, run grails compile, automatically answer 'y' to each upgrade question, and then refresh the dependencies and rebuild the workspace just the once.

        Activity

        Hide
        Peter Ledbrook added a comment -

        Interestingly, the behaviour I suggested seems to be what happens when installing multiple plugins. So hopefully it's just a case of using the same logic/code for plugin updates as when as new plugin installations.

        Show
        Peter Ledbrook added a comment - Interestingly, the behaviour I suggested seems to be what happens when installing multiple plugins. So hopefully it's just a case of using the same logic/code for plugin updates as when as new plugin installations.
        Hide
        Kris De Volder (c) added a comment -

        A day or two ago we did some major restructuring of the code surrounding grails command execution. I distinctly remember the work we did on the loop in the grails plugin manager that installs/uninstalls plugins. I think we precisely restructured as you suggest so that all plugins are installed/uninstalled and then after that we do a refresh dependencies only once. A single build happens after that.

        Perhaps if you could try out the latest snapshot build and confirm this also works for you.

        We can then close this issue (or take a second look at the refactored code

        Kris

        Show
        Kris De Volder (c) added a comment - A day or two ago we did some major restructuring of the code surrounding grails command execution. I distinctly remember the work we did on the loop in the grails plugin manager that installs/uninstalls plugins. I think we precisely restructured as you suggest so that all plugins are installed/uninstalled and then after that we do a refresh dependencies only once. A single build happens after that. Perhaps if you could try out the latest snapshot build and confirm this also works for you. We can then close this issue (or take a second look at the refactored code Kris
        Kris De Volder (c) made changes -
        Field Original Value New Value
        Assignee Kris De Volder [ kdvolder ]
        Christian Dupuis made changes -
        Remaining Estimate 0h [ 0 ]
        Fix Version/s 2.5.0.RC1 [ 10790 ]
        Original Estimate 0h [ 0 ]
        Hide
        Peter Ledbrook added a comment -

        I updated STS, but when I modified application.properties to downgrade some versions and refreshed the project in STS, the IDE lost track of all the plugins! Neither the Grails project tree nor the plugin manager are showing any installed plugins. I've refreshed the project and the dependencies several times to no avail. Even closing and reopening the project didn't help, so I guess something is wrong with the project files.

        I think I may have to remove the project and reimport it.

        Show
        Peter Ledbrook added a comment - I updated STS, but when I modified application.properties to downgrade some versions and refreshed the project in STS, the IDE lost track of all the plugins! Neither the Grails project tree nor the plugin manager are showing any installed plugins. I've refreshed the project and the dependencies several times to no avail. Even closing and reopening the project didn't help, so I guess something is wrong with the project files. I think I may have to remove the project and reimport it.
        Hide
        Peter Ledbrook added a comment -

        OK, when I got it working, the updates went much quicker. For some reason, install-plugin is still being run for each of the plugins, but at least the dependencies are not updated and the project rebuilt until the end.

        Show
        Peter Ledbrook added a comment - OK, when I got it working, the updates went much quicker. For some reason, install-plugin is still being run for each of the plugins, but at least the dependencies are not updated and the project rebuilt until the end.
        Hide
        Andrew Eisenberg (c) added a comment -

        Are you saying that it is possible to run a single install-plugin command that installs multiple plugins? That's not something that I see in the documentation:

        http://grails.org/doc/latest/ref/Command%20Line/install-plugin.html

        What is the command line syntax for this? If this is possible, then it would certainly speed up installs/uninstalls.

        Show
        Andrew Eisenberg (c) added a comment - Are you saying that it is possible to run a single install-plugin command that installs multiple plugins? That's not something that I see in the documentation: http://grails.org/doc/latest/ref/Command%20Line/install-plugin.html What is the command line syntax for this? If this is possible, then it would certainly speed up installs/uninstalls.
        Hide
        Peter Ledbrook added a comment -

        No, install-plugin can only install one plugin at a time. What you can do is change the versions in application.properties and run Grails to update the plugins. This seems to be what already happens when multiple plugins are installed via the STS Plugin Manager. Unless that's changed since I last tried it.

        Show
        Peter Ledbrook added a comment - No, install-plugin can only install one plugin at a time. What you can do is change the versions in application.properties and run Grails to update the plugins. This seems to be what already happens when multiple plugins are installed via the STS Plugin Manager. Unless that's changed since I last tried it.
        Hide
        Kris De Volder (c) added a comment -

        I don't think this has ever been something we did. In general our tools are as much as possible just UI on top of the grails commandline commands.

        Personally, I would be very hesitant to make our tools depend on directly modifying grails properties files. One reason is that we'd be more likely to have things break when switching between grails versions.

        So, if we need to have some way of installing multiple plugins at a time without booting-up grails each time, (which I agree seems desisarable) we'd need a grails command that provides similar functionality.

        Show
        Kris De Volder (c) added a comment - I don't think this has ever been something we did. In general our tools are as much as possible just UI on top of the grails commandline commands. Personally, I would be very hesitant to make our tools depend on directly modifying grails properties files. One reason is that we'd be more likely to have things break when switching between grails versions. So, if we need to have some way of installing multiple plugins at a time without booting-up grails each time, (which I agree seems desisarable) we'd need a grails command that provides similar functionality.
        Hide
        Kris De Volder (c) added a comment -

        I'm closing this. I think that avoiding multiple refresh dependencies and builds is the best we can do at the moment, lacking a grails command to install multiple plugins at once.

        Show
        Kris De Volder (c) added a comment - I'm closing this. I think that avoiding multiple refresh dependencies and builds is the best we can do at the moment, lacking a grails command to install multiple plugins at once.
        Kris De Volder (c) made changes -
        Resolution Fixed [ 8 ]
        Status To Do [ 10003 ] Done [ 10004 ]
        Kris De Volder (c) made changes -
        Fix Version/s 2.5.0.RC1 [ 10790 ]
        Kris De Volder (c) made changes -
        Status Done [ 10004 ] In Progress [ 3 ]
        Resolution Fixed [ 8 ]
        Kris De Volder (c) made changes -
        Status In Progress [ 3 ] To Do [ 10003 ]
        Hide
        Kris De Volder (c) added a comment -

        Talked about this with Andrew. We can't do what Peter suggests (modifying directly in application.properties) now, because our dependency refreshing code is too shaky to make this work now. But it seems like eventually we should be able to get this working.

        So I reopened this but took of the "Fix for RC1".

        Show
        Kris De Volder (c) added a comment - Talked about this with Andrew. We can't do what Peter suggests (modifying directly in application.properties) now, because our dependency refreshing code is too shaky to make this work now. But it seems like eventually we should be able to get this working. So I reopened this but took of the "Fix for RC1".
        Hide
        Peter Ledbrook added a comment -

        The current behaviour is fine and I would leave it at that. As you say, modifying application.properties is too reliant on underlying behaviour. It also won't work with plugins declared in the dependency DSL in BuildConfig.groovy.

        It looks like we'll be having a Grails 1.4, so if you have any requests for that, contact Graeme. Perhaps we can make life easier for you in some of these areas.

        Show
        Peter Ledbrook added a comment - The current behaviour is fine and I would leave it at that. As you say, modifying application.properties is too reliant on underlying behaviour. It also won't work with plugins declared in the dependency DSL in BuildConfig.groovy . It looks like we'll be having a Grails 1.4, so if you have any requests for that, contact Graeme. Perhaps we can make life easier for you in some of these areas.
        Hide
        Kris De Volder (c) added a comment -

        OK, in that case I'll close it for now.

        Show
        Kris De Volder (c) added a comment - OK, in that case I'll close it for now.
        Kris De Volder (c) made changes -
        Status To Do [ 10003 ] Done [ 10004 ]
        Resolution Complete [ 13 ]
        Christian Dupuis made changes -
        Fix Version/s 2.5.0.RC1 [ 10790 ]
        Christian Dupuis made changes -
        Workflow dm Server Workflow [ 26073 ] jira [ 28530 ]
        Issue Type Defect [ 12 ] Bug [ 6 ]
        Trevor Marshall (c) made changes -
        Workflow jira [ 28530 ] jira with Pivotal Tracker [ 65049 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Done Done In Progress In Progress
        2h 53m 1 Kris De Volder (c) 04/Oct/10 4:03 PM
        In Progress In Progress To Do To Do
        11s 1 Kris De Volder (c) 04/Oct/10 4:03 PM
        To Do To Do Done Done
        6d 2h 45m 2 Kris De Volder (c) 06/Oct/10 10:21 AM

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Ledbrook
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: