开发者

How to safely update a grails plugin

开发者 https://www.devze.com 2023-03-12 08:22 出处:网络
I\'ve been working on a grails project for a while now and some of the plugins I installed initially have been updated.

I've been working on a grails project for a while now and some of the plugins I installed initially have been updated.

I ran the following scripts to see what plugins needed updating

grails list-plugin-updates

and the result was

开发者_Go百科
Plugins with available updates are listed below:
-------------------------------------------------------------
<Plugin>            <Current>         <Available>
joda-time           1.1               1.2
jquery              1.4.4.1           1.6.1.1
jquery-ui           1.8.7             1.8.11
recaptcha           0.5.0             0.5.2
searchable          0.5.5.1           0.6
spring-security-core1.1               
tomcat              1.3.7             1.3.7.2

Now how do I go about updating all or some these plugins?

Is it a matter of uninstalling and reinstalling each one?

How does this affect usages/references to the plugin in the main code?


To update a plugin you just run install-plugin again and it'll detect that the plugin's already installed and will remove the old one and install the new one. For a small version delta this should be fine, but I'd do them one at a time and test in-between (but do the 2 JQuery plugins together).

If you're lucky the plugin either has no compatibility issues, or they're documented in the plugin docs, so be sure to check there before upgrading.


From Grails 2.2 on, you should change the plugins section of BuildConfig.groovy. After that you should run 'refresh-dependencies'.

If you use Groovy/Grails Tool Suite or something similar, you should simply right click on your project > Grails Tools > Refresh Dependencies. This will run the grails command which will update your dependencies, but it will also update your project.

0

精彩评论

暂无评论...
验证码 换一张
取 消