How do I configure installation of plugins in Grails 3.0.4?

∥☆過路亽.° 提交于 2019-12-11 13:57:53

问题


I'm porting an application from Grails 2.4.2 to Grails 3.0.4, and I'm having problems with some plugins that were installed previously. Specifically one that is referenced in a GSP page. The particular plugin is called google-visualizer, and I've found some info here:

https://github.com/bmuschko/grails-google-visualization/blob/master/grails-app/views/formatter/index.gsp

However, I am clueless as to how to install this. I have not found the particular jar file in any maven repo, so I can't add it as a Gradle dependency. In general, where is it documented how to install existing plugins in Grails 3.X? I've read the documentation on how to port existing plugins, but that's not what I'm trying to do. I simply want to tell Grails/Gradle that I'd like to use this particular plugin and have it resolve the dependencies for me. I've tried this syntax as shown here:

https://grails.org/plugins/tag/grails3

Example: 

compile ":quartz:1.0.2"

I've put that line in the dependencies block in my build.gradle file, but it doesn't work. I get errors from Gradle. Is there a particular Maven repo that has to be added for plugins? Any help with this is appreciated. Thanks.


回答1:


Grails 1.x and 2.x plugins are sadly not compatible with Grails 3.x.

You can find the plugins that already have been ported to Grails 3 at: https://bintray.com/grails/plugins/

The grails-google-visualization plugin is not released in a Grails 3 version, but from the repo, it appears that work has started on upgrading. You can see the progress on a Grails 3 version in this issue: https://github.com/bmuschko/grails-google-visualization/issues/49

Benjamin searched for a new maintainer back some time ago, and found a volunteer - see this tread for details: https://twitter.com/bmuschko/status/498610606896066560

For those plugins that are most important, the Grails Core team maintains a list here: https://github.com/grails/grails-core/wiki/Grails-3-Priority-Upgrade-Plugins

Some of the old plugins will be replaced by their Gradle counterpart, fx. the codenarc plugin, that exist in a Gradle version already.




回答2:


A simple way is to find out the JAR file for the plugin and then use them in Grails 3.0.4. In this way there is no need to change the source code of the plugin



来源:https://stackoverflow.com/questions/32293064/how-do-i-configure-installation-of-plugins-in-grails-3-0-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!