Grails导入插件在Grails中失败(rest插件:compile:“rest-client-builder:2.0.0”和“:rest0.8”) [英] Grails Import Plugin Fails in Grails (rest plugin: compile ":rest-client-builder:2.0.0" and ":rest0.8")

查看:109
本文介绍了Grails导入插件在Grails中失败(rest插件:compile:“rest-client-builder:2.0.0”和“:rest0.8”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图导入插件rest-client-builder:2.0.0和:rest0.8。
我正在运行grails 2.3.2



我将Grails插件添加到BuildConfig.groovy
=> compile中:rest-client-builder: 2.0.0



然后我执行grails refresh-dependencies。然后进入grails控制器并尝试导入grails.plugin.rest客户端生成器和这失败..我使用eclipse ..

我可以看到虽然我的目录中列出的控制器但eclipse没有加载它:

 
Virals-MacBook-Pro:插件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:插件viralcarpenter $ ls rest *
RestClientBuilderGrailsPlugin.groovy application.properties plugin.xml
Virals-MacBook-Pro:插件viralcarpenter $


解决方案

插件在 BuildConfig .groovy中声明,不在Bootstrap.groovy中。


$ b BuildConfig.groovy:

  [...] 

plugins {
compile':rest-client-builder:2.0。 0'
}

您应该检查插件的文档


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$ 

解决方案

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

这篇关于Grails导入插件在Grails中失败(rest插件:compile:“rest-client-builder:2.0.0”和“:rest0.8”)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆