什么是在grails 2.3上安装grails插件的正确方法?

时间:2016-09-25 08:04:47

标签: grails grails-plugin

我必须在grails 2.3上安装grails twilio插件,这里有插件https://github.com/Novadge/grails-twilio

有人可以帮我在grails 2.3项目上安装这个插件吗?

2 个答案:

答案 0 :(得分:3)

您必须将此添加到BuildConfig.groovy

compile "org.grails.plugins:twilio:0.1"

此处的文档:https://grails.org/plugin/twilio

答案 1 :(得分:1)

如文档中所示,您可以通过在config.groovy文件中添加twillo配置来安装插件 -

twilio {
    // Enter your host address
    host = 'https://api.twilio.com'
    apiID = 'enter your api Id'
    apiPass = 'enter your api password'
    smsUrl = '/2010-04-01/Accounts/' + apiID + '/Messages.json'
    number = ""
}

以及dependenciesBuildConfig.groovy下的其他相关相关组件 -

     dependencies {
     .
     .
     //twilio plugin        
     compile "org.grails.plugins:twilio:0.1"

     compile(group:'org.apache.httpcomponents',name:'httpclient',version:'4.3.6')
     compile(group:'org.apache.httpcomponents',name:'fluent-hc',version:'4.3.6')
     compile(group:'org.apache.httpcomponents',name:'httpclient-cache',version:'4.3.6')
     compile(group:'org.apache.httpcomponents',name:'httpmime',version:'4.3.6')

    .
    .

    }