ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39532] New: - an implementation of sftp task
Date Tue, 09 May 2006 14:33:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39532>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39532

           Summary: an implementation of sftp task
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: atsuhiko.yamanaka@gmail.com


The attached patch is a quick hack to implement sftp task, which
is based on ftp task and using jsch for sftp functionality.
It accepts attributes for ftp and scp tasks except for 'binary',
'passive', 'separator' and 'umask'.

It seems following tasks are working on my testing, however, frankly to say,
I'm not familiar with ftp task and have never used and run it, so I may
mis-understand its operational semantics.  Comments, suggestions and feedbacks
are welcome.

PS 1. that patch is for ant_20060509104815.tar.gz
PS 2. jsch-0.1.28 is required.

 <taskdef name="sftp" 
classname="org.apache.tools.ant.taskdefs.optional.ssh.SFTP"/>

 <sftp action="send"
      server="${server}"
      userid="${userid}"
      password="${password}"
      remotedir="incoming"
      depends="yes">
    <fileset dir="htdocs/manual"/>
 </sftp>

 <sftp action="get"
      server="${server}"
      userid="${userid}"
      password="${password}">
   <fileset dir="htdocs/manual" >
     <include name="**/*.html"/>
   </fileset>
 </sftp>

 <sftp action="del"
      server="${server}"
      userid="${userid}"
      password="${password}" >
   <fileset>
     <include name="**/*.tmp"/>
   </fileset>
 </sftp>

 <sftp action="list"
      server="${server}"
      userid="${userid}"
      password="${password}"
      listing="data/sftp.listing" >
   <fileset>
     <include name="**"/>
   </fileset>
 </sftp>

 <sftp action="mkdir"
      server="${server}"
      userid="${userid}"
      password="${password}"
      remotedir="test" />

 <sftp action="chmod"
      server="${server}"
      userid="${userid}"
      password="${password}"
      chmod="0700" >
   <fileset>
     <include name="*.log"/>
   </fileset>
 </sftp>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message