Wednesday, October 12, 2011

Using properties from Grails script

If you have custom Grails script and need to access property file from it, I found that easiest way to do it is to use Ant. There is complete example how to access file and to use variables:
ant.property(file:'user.properties')
ant.scp(file:'target/app.war', todir:"${ant.project.properties.login}:${ant.project.properties.password}@server:/home/tomcat/", trust:true)

No comments:

Post a Comment