2013-06-25 71 views
1

我需要使用2.2.1中的Grails「release」插件,並將其添加到下面我的BuildConfig.groovy中的插件中:Grails 2.2.1無法識別從BuildConfig.groovy安裝的「release」插件

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的部署:

$ 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 

我得到了它使用過時的安裝,插件目標工作。 我不知道爲什麼這不起作用,想知道是否有人可以闡明它。謝謝

回答

0

確保已設置$ GRAILS_HOME環境變量並指向文件系統上的正確位置。

3

BuildConfig.groovy中爲release插件添加條目之後,請執行grails compilegrails run-app。我通常更喜歡grails clean && grails compile

一旦清理和彙編,可以查看已安裝的插件列表
grails list-plugins --installed

已爲我工作。 :-)