tags:

views:

335

answers:

2

I'm trying to get our CI-Server Hudson to run grails tasks and installed the Grails-Plugin, but it seems like the dependencies with ivy could not be resolved...

[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) ...

Does anyone know how to get this working?

Thanks alot!

A: 

Hudson supports maven based builds very well so you could just use the Grails Maven Plugin http://www.grails.org/Maven+Integration and point hudson at the maven pom file and away you go.

Manfred Moser
+3  A: 

It looks like the user that tomcat is running as is configured to have /usr/share/tomcat5.5 as the home directory and you don't have write access to that directory (and probably shouldn't)

I'd guess that you need to modify the user that tomcat is running as, or the user that the Hudson Job is running as to have a valid home directory.

Also, This tutorial might be of use to you.

Colin Harrington
I agree, it will be due to file permissions stoping the .ivy folder being created.
leebutts
Thanks, that got me a bit further. I've created /home/tomcat with appropriate permissions and changed the tomcat's home, but unfortunately there is another error...After some compiling, copying and mkdir-ing the build process fails with:Error executing script War: : Replace: source file /home/tomcat55/.grails/1.2.0/projects/comtecdb/stage/WEB-INF/applicationContext.xml doesn't existgant.TargetExecutionException: : Replace: source file /home/tomcat55/.grails/1.2.0/projects/comtecdb/stage/WEB-INF/applicationContext.xml doesn't exist ...
Jan
SOLVED! I run an "grails upgrade --non-interactive" first and it works.
Jan