Bug 39532 - [Patch] an implementation of sftp task
Summary: [Patch] an implementation of sftp task
Status: RESOLVED DUPLICATE of bug 39373
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.7.0
Hardware: All other
: P2 enhancement with 2 votes (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 14:33 UTC by atsuhiko.yamanaka
Modified: 2008-07-14 06:44 UTC (History)
1 user (show)



Attachments
an implementation of sftp task (98.90 KB, patch)
2006-05-09 14:35 UTC, atsuhiko.yamanaka
Details | Diff
minor bug fixes and deleting some redundant code (95.23 KB, patch)
2006-06-14 07:49 UTC, Atsuhiko Yamanaka
Details | Diff
sftp.html (16.22 KB, text/html)
2006-06-14 08:29 UTC, Atsuhiko Yamanaka
Details
a patch to use sftp protocol in scp task. (94.92 KB, patch)
2006-12-18 22:33 UTC, Atsuhiko Yamanaka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description atsuhiko.yamanaka 2006-05-09 14:33:50 UTC
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>
Comment 1 atsuhiko.yamanaka 2006-05-09 14:35:22 UTC
Created attachment 18250 [details]
an implementation of sftp task
Comment 2 Atsuhiko Yamanaka 2006-06-14 07:49:58 UTC
Created attachment 18461 [details]
minor bug fixes and deleting some redundant code
Comment 3 Atsuhiko Yamanaka 2006-06-14 08:29:24 UTC
Created attachment 18462 [details]
sftp.html
Comment 4 Atsuhiko Yamanaka 2006-12-18 22:33:44 UTC
Created attachment 19287 [details]
a patch to use sftp protocol in scp task.

a patch to compile with jsch-0.1.29(and later).
Comment 5 Stefan Bodewig 2008-07-14 06:44:45 UTC

*** This bug has been marked as a duplicate of bug 39373 ***