Calling ANT scripts from ColdFusion
We have been fiddling with getting CF to call a self updating ANT script. There are a few articles around about the undocumented cfant tag.
Getting cfant to run a build file is not all that hard, we loop over the sites in our dev server directory, check to see if a build file exists and try and run the 'updateserver' target.
<cfant buildFile="#buildFile#"
defaultDirectory=""
anthome="C:\Program Files\apache-ant-1.7.1\"
messages="output"
target="updateserver"/>
A couple of things to note:
There seems to be a memory leak in here. This runs happily every half an hour for about 3 hours, then jrun decides not to go any more. There is no way we can find to pass in user variables to ANT. i.e. you cant pass in a username / password as you would through the console in Eclipse or via the command line. This is a bit of a down side. We hoped we could have one generic build file and pass the path to it rather than having a build file in each directory.
More on this self updating script shortly.


There are no comments for this entry.
[Add Comment]