[Anthill-pro] FTP Step

Brian_Kelly at timeinc.com Brian_Kelly at timeinc.com
Mon Feb 8 13:20:37 CST 2010


Hi all,
 
One of our projects would like the ability to FTP documentation to a
particular server based on the environment we're deploying to. The
destination can easily be set via Project Environment Properties, but
I'm trying to sort out the best way to actually implement the step.
 
Since I need to recursively upload a set of files and folders I can't
use a simple command-line call to an "ftp" command.
 
I then wrote a little Ant script to do the task but realized I'd need to
package up the Commons Net JARs that are required by the option FTP task
for Ant.  I don't want projects to have to package up JARs in a project
just to appease a step in an AHP job. I could maybe use a deploy-time
dependency but that could get messy. So I started looking at writing a
plugin.
 
My first stab was using Groovy but after seeing that the Ant FTP task
just requires a source directory, I didn't want to do all the heavy
lifting in Groovy to recursively upload files and use file streams using
commons.net.ftp.FTPClient. Yuck!
 
So then I decided to see if I could just call an Ant script from a
plugin and use the ftp task and package up the required JARs with the
plugin. Unfortunately it's complaining that it can't find build.xml
because the script is passed as an argument but without the necessary -f
for Ant. I tried naming my file buid.xml but it still can't manage to
find it. And adding -f to the <interpreter> element results in an error
trying to find a file called "ant-f"
 
Any suggestions or alternate ideas?
 
-brian
 
PS - This was the Groovy FTP script I found to work off of:
http://www.hhhhq.org/blog/2009/05/01/ftp-using-groovy-and-ant/
 


More information about the Anthill-pro mailing list