Grails 安装邮件插件-表示已弃用安装插件

Grails 安装邮件插件-表示已弃用安装插件,grails,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

我在尝试安装邮件插件时收到此警告

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
。当我检查命令时,它也显示了相同的命令


有人能告诉我正确的命令是什么吗?

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

plugins {
  runtime ":mail:1.0.4"
}
删除
application.properties
中可能存在的对插件的任何引用