安装邮件插件 - 说不推荐使用install-plugin

时间:2014-04-16 19:14:16

标签: grails

当我尝试安装邮件插件时,我收到了此警告。

Loading Grails 2.2.4
| Environment set to development.....
| Warning The install-plugin command is deprecated and may be removed from a future version of Grails.  Plugin dependencies should be expressed in grails-app/conf/BuildConfig.groovy.  See http://grails.org/doc/2.2.x/guide/conf.html#pluginDependencies.
| Resolving plugin mail. Please wait...

我使用的命令是install-plugin mail。当我检查documentation时,它也向我显示了相同的命令。

有人可以通过告诉我正确的命令是什么来指导我吗?

1 个答案:

答案 0 :(得分:1)

您不需要运行任何命令,只需在BuildConfig.groovy中声明插件依赖项,如下所示:

plugins {
  runtime ":mail:1.0.4"
}

删除application.properties中可能存在的对该插件的任何引用。

相关问题