我需要在 2.2.1 中使用 Grails“发布”插件,并将其添加到下面的 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
或(在 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 目标让它工作。我不知道为什么这不起作用,并且想知道是否有人可以对此有所了解。谢谢