Grails Import Plugin Fails in Grails (rest plugin: compile “:rest-client-builder:2.0.0” and “:rest0.8”)

会有一股神秘感。 提交于 2020-01-15 09:55:39

问题


I am trying to import plugin "rest-client-builder:2.0.0" and ":rest0.8". I am running grails 2.3.2

I add the grails plugin into BuildConfig.groovy => compile ":rest-client-builder:2.0.0"

Then i do "grails refresh-dependencies"

Then go into the grails controller in and try to import grails.plugin.rest-client-builder and this fails.. I am using eclipse..

I can see the controller listed in my directory though but eclipse doesnt load it:

Virals-MacBook-Pro:plugins viralcarpenter$ ls
cache-1.1.1         hibernate-3.6.10.3      resources-1.2.1         scaffolding-2.0.1       webxml-1.4.1
database-migration-1.3.8    jquery-1.10.2           rest-client-builder-2.0.0   tomcat-7.0.42
Virals-MacBook-Pro:plugins viralcarpenter$ ls rest*
RestClientBuilderGrailsPlugin.groovy    application.properties          plugin.xml
Virals-MacBook-Pro:plugins viralcarpenter$ 


回答1:


Plugins are declared in BuildConfig.groovy, not in Bootstrap.groovy.

BuildConfig.groovy:

[...]

plugins{
    compile ':rest-client-builder:2.0.0'
}

You should check the documentation of the plugin



来源:https://stackoverflow.com/questions/20984466/grails-import-plugin-fails-in-grails-rest-plugin-compile-rest-client-builder

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