Grails 哈德逊没有';我不喜欢圣杯

Grails 哈德逊没有';我不喜欢圣杯,grails,hudson,ivy,Grails,Hudson,Ivy,我试图让我们的CI服务器Hudson运行grails任务并安装grails插件,但似乎无法解决与ivy的依赖关系 [projectx] $ /usr/share/grails/bin/grails prod war projectx.war Welcome to Grails 1.2.0 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /usr/share/grails

我试图让我们的CI服务器Hudson运行grails任务并安装grails插件,但似乎无法解决与ivy的依赖关系

[projectx] $ /usr/share/grails/bin/grails prod war projectx.war
Welcome to Grails 1.2.0 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /usr/share/grails

Base Directory: /var/local/hudson/jobs/projectx/workspace/projectx
Resolving dependencies...
Error executing script War: /usr/share/tomcat5.5/.ivy2/cache/resolved-projectx-projectx-0.1.xml (No such file or directory)
java.io.FileNotFoundException: /usr/share/tomcat5.5/.ivy2/cache/resolved-projectx-projectx-0.1.xml (No such file or directory)
    at java.io.FileOutputStream.open(Native Method) ...
有人知道如何让它工作吗


非常感谢

Hudson非常支持基于maven的构建,因此您可以使用Grails maven插件,将Hudson指向maven pom文件,然后就可以开始了

看起来tomcat正在运行的用户被配置为将
/usr/share/tomcat5.5
作为主目录,而您没有对该目录的写访问权限(可能不应该)

我猜您需要修改tomcat正在作为运行的用户,或者Hudson作业正在作为运行的用户,以便拥有有效的主目录。

Run

grails upgrade
然后它就会起作用。我尝试删除.grails文件夹,但它不起作用,并发现升级工作是偶然的

在Jenkins上,你可以用一个非交互式的开关来运行它


有人知道为什么会发生这种情况吗?

你在Hudson的Grails插件配置中设置了工作目录了吗?我同意,这是因为文件权限停止了正在创建的.ivy文件夹。谢谢,这让我更进一步了。我已经用适当的权限创建了/home/tomcat并更改了tomcat的主页,但不幸的是,还有另一个错误。。。经过一番整理,,复制和mkdir生成过程失败,原因是:执行脚本War::Replace时出错:源文件/home/tomcat55/.grails/1.2.0/projects/comtecdb/stage/WEB-INF/applicationContext.xml不存在gant.TargetExecutionException::Replace:source file/home/tomcat55/.grails/1.2.0/projects/comtecdb/stage/WEB-INF/applicationContext.xml不存在存在…解决!我先运行了一个“grails升级-非交互式”程序,它就可以工作了。也许你忘了将web app/web-INF添加到你的版本控制中。