ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: SFTP task
Date Wed, 28 Feb 2007 07:19:57 GMT

-----Original Message-----
From: Dick, Brian E. [] 
Sent: Tuesday, February 27, 2007 9:30 PM
Subject: SFTP task

I have the FTP task all over my build files, and now I need to use SFTP.
I don't see an SFTP task. I only see sftp as a parameter for the SCP
task, but SCP has a completely different syntax from FTP and would
require a lot of re-coding.

What's the easiest way to get from FTP to SFTP?

you could use the free maverick ant task =

here's a snippet of the examples shipped with that task =

       <ssh host=""

         <exec cmd="ls"/>

         <sftp action="mkdir"

         <sftp action="put" remotedir="ant_rules" verbose="true">
           <fileset dir="somejars">
             <include name="*.jar"/>

         <sftp mode="666" action="chmod" remotedir="ant_rules"
             <include name="*.jar"/>

         <exec cmd="tar -zcf archive.tar.gz ant_rules"/>

         <exec cmd="passwd">
         <sftp action="get">

         <sftp action="rmdir" remotedir="ant_rules"/>


seems exactly what you want. The task has a clear syntax and _no_
library dependencies , it only lacks of a resultproperty of it's sub

But beware = i had some difficulties with maverick using for target
platform AIX, means ssh/sftp transfer from windows to AIX via ant.
After a successful handshake it hung up from time to time.

Others - the support of 3SP Ltd included - couldn't reproduce it and use

the task regularly without difficulties.

Give it a shot.

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message