2013-01-16 54 views
2

我試圖使用發佈2.0.4插件通過grails 2.1.1部署我的戰爭到artifactory服務器。Grails和發佈插件

我BuildConfig.groovy有:

grails.project.repos.snap.url = "http://server:8080/artifactory/apps-snapshot-local" 
grails.project.repos.snap.username = "user" 
grails.project.repos.snap.password = "password" 

grails.project.repos.rel.url = "http://server:8080/artifactory/apps-release-local" 
grails.project.repos.rel.username = "user" 
grails.project.repos.rel.password = "password" 

grails.project.repos.default = "rel" 

當我只是做了「的Grails Maven的部署」,它的工作原理,並如預期部署到我的服務器版本。當我嘗試通過命令行覆蓋默認目標時,我遇到了失敗。

grails maven-deploy --repository=snap 

我得到這個:

| Done creating WAR snap 
| POM generated: C:\dev-git\DBUpdateWeb\target/pom.xml. 
| Error Error deploying artifact: C:\dev-git\DBUpdateWeb\target\DBUpdateWeb.war (The system cannot find the file specified) 
| Error Have you specified a configured repository to deploy to (--repository argument) or specified distributionManagement in your POM? 

當我做指定--repository標籤不產生一場戰爭,即使它說,它做到了。任何幫助表示讚賞。提前致謝。

回答

2

嘗試grails maven-deploy「--repository = snap」。

此外,在application.properties中指定app.version,以使WAR符合標準(1.0-SNAPSHOT用於發佈到快照存儲庫,1.0用於發佈),並註釋掉grails.project.war.file行在BuildConfig.groovy中。