我需要在2.2.1中使用Grails“release”插件,然后将其添加到我的BuildConfig.groovy中的插件中:
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.1.6"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.3.2", ":cors:1.1.0"
compile ':cache:1.0.1'
build ":release:2.2.1"
}
我尝试运行maven-deploy:
$ grails prod maven-deploy --repository=releases --verbose --non-interactive
| Loading Grails 2.2.1
| Error WARNING: Configurational method [:release:2.2.1] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
| Error WARNING: Configurational method [build] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
| Running pre-compiled script
| Error Script not found: MavenDeploy
OR(在BuildConfig.groovy中从构建更改为编译时):
| Running pre-compiled script
| Error Script not found: MavenDeploy
我尝试列出发布插件不存在的插件:
$ grails list-plugins --installed
Plug-ins you currently have installed are listed below:
-------------------------------------------------------------
cache 1.0.1 -- Cache Plugin
common-domain 1.2.4 -- Common Domain Plugin
cors 1.1.0 -- CORS Plugin
database-migration 1.3.2 -- Grails Database Migration Plugin
hibernate 2.2.1 -- Hibernate for Grails
jquery 1.8.3 -- JQuery for Grails
resources 1.1.6 -- Resources
tomcat 2.2.1 -- Apache Tomcat plugin for Grails
webxml 1.4.1 -- WebXmlConfig
我使用弃用的install-plugin目标让它工作。 我不知道为什么这不起作用,并想知道是否有人可以阐明它。感谢
答案 0 :(得分:3)
在BuildConfig.groovy
插件的release
中添加条目后,请执行grails compile
或grails run-app
。我通常更喜欢grails clean && grails compile
。
清理和编译后,您可以检查已安装的插件列表
grails list-plugins --installed
它一直在为我工作。 : - )
答案 1 :(得分:0)
确保已设置$ GRAILS_HOME环境变量并指向文件系统上的正确位置。