[STS-1260] Updating more than one plugin from Grails plugin manager is very long-winded Created: 30/Sep/10  Updated: 30/Nov/10  Resolved: 06/Oct/10

Status: Resolved
Project: Spring Tool Suite
Component/s: None
Affects Version/s: 2.5.0.M3
Fix Version/s: 2.5.0.RC1

Type: Bug Priority: Minor
Reporter: Peter Ledbrook Assignee: Unassigned
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: Not Specified
Original Estimate: 0d


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.

Comment by Peter Ledbrook [ 30/Sep/10 ]

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.

Comment by Kris De Volder [ 01/Oct/10 ]

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


Comment by Peter Ledbrook [ 01/Oct/10 ]

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.

Comment by Peter Ledbrook [ 04/Oct/10 ]

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.

Comment by Andrew Eisenberg [ 04/Oct/10 ]

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:


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

Comment by Peter Ledbrook [ 04/Oct/10 ]

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.

Comment by Kris De Volder [ 04/Oct/10 ]

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.

Comment by Kris De Volder [ 04/Oct/10 ]

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.

Comment by Kris De Volder [ 04/Oct/10 ]

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".

Comment by Peter Ledbrook [ 05/Oct/10 ]

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.

Comment by Kris De Volder [ 06/Oct/10 ]

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

Generated at Fri Oct 19 07:38:28 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.