|
|
@@ -74,35 +74,35 @@ coming from your ftp server (ls -l on the ftp prompt). |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">action</td> |
|
|
|
<td valign="top">the ftp action to perform, defaulting to "send". |
|
|
|
Currently supports "put", "get", |
|
|
|
"del", "list", "chmod", |
|
|
|
"mkdir" and "rmdir".</td> |
|
|
|
<td valign="top">the ftp action to perform, defaulting to "send". |
|
|
|
Currently supports "put", "get", |
|
|
|
"del", "list", "chmod", |
|
|
|
"mkdir" and "rmdir".</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">binary</td> |
|
|
|
<td valign="top">selects binary-mode ("yes") or text-mode |
|
|
|
("no") transfers. |
|
|
|
Defaults to "yes"</td> |
|
|
|
<td valign="top">selects binary-mode ("yes") or text-mode |
|
|
|
("no") transfers. |
|
|
|
Defaults to "yes"</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">passive</td> |
|
|
|
<td valign="top">selects passive-mode ("yes") transfers. |
|
|
|
Defaults to "no"</td> |
|
|
|
<td valign="top">selects passive-mode ("yes") transfers. |
|
|
|
Defaults to "no"</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">verbose</td> |
|
|
|
<td valign="top">displays information on each file transferred if set |
|
|
|
to "yes". Defaults to "no".</td> |
|
|
|
to "yes". Defaults to "no".</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">depends</td> |
|
|
|
<td valign="top">transfers only new or changed files if set to |
|
|
|
"yes". Defaults to "no".</td> |
|
|
|
"yes". Defaults to "no".</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@@ -113,7 +113,7 @@ coming from your ftp server (ls -l on the ftp prompt). |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">timediffauto</td> |
|
|
|
<td valign="top">set to <code>"true"</code> |
|
|
|
<td valign="top">set to <code>"true"</code> |
|
|
|
to make ant calculate the time difference between client and server.<br> |
|
|
|
<em>requires write access in the remote directory</em><br> |
|
|
|
Since ant 1.6</td> |
|
|
@@ -130,7 +130,7 @@ coming from your ftp server (ls -l on the ftp prompt). |
|
|
|
<tr> |
|
|
|
<td valign="top">separator</td> |
|
|
|
<td valign="top">sets the file separator used on the ftp server. |
|
|
|
Defaults to "/".</td> |
|
|
|
Defaults to "/".</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@@ -147,8 +147,8 @@ coming from your ftp server (ls -l on the ftp prompt). |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">listing</td> |
|
|
|
<td valign="top">the file to write results of the "list" action. |
|
|
|
Required for the "list" action, ignored otherwise.</td> |
|
|
|
<td valign="top">the file to write results of the "list" action. |
|
|
|
Required for the "list" action, ignored otherwise.</td> |
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
@@ -387,36 +387,36 @@ Remote filesets do not support selectors.<br> |
|
|
|
<h3>Sending Files</h3> |
|
|
|
<p>The easiest way to describe how to send files is with a couple of examples:</p> |
|
|
|
<pre> |
|
|
|
<ftp server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com"> |
|
|
|
<fileset dir="htdocs/manual"/> |
|
|
|
<ftp server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com"> |
|
|
|
<fileset dir="htdocs/manual"/> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
|
<p>Logs in to <code>ftp.apache.org</code> as <code>anonymous</code> and |
|
|
|
uploads all files in the <code>htdocs/manual</code> directory |
|
|
|
to the default directory for that user.</p> |
|
|
|
<pre> <ftp server="ftp.apache.org" |
|
|
|
remotedir="incoming" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
depends="yes"> |
|
|
|
<fileset dir="htdocs/manual"/> |
|
|
|
<pre> <ftp server="ftp.apache.org" |
|
|
|
remotedir="incoming" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
depends="yes"> |
|
|
|
<fileset dir="htdocs/manual"/> |
|
|
|
</ftp></pre> |
|
|
|
<p>Logs in to <code>ftp.apache.org</code> as <code>anonymous</code> and |
|
|
|
uploads all new or changed files in the <code>htdocs/manual</code> directory |
|
|
|
to the <code>incoming</code> directory relative to the default directory |
|
|
|
for <code>anonymous</code>.</p> |
|
|
|
<pre> <ftp server="ftp.apache.org" |
|
|
|
port="2121" |
|
|
|
remotedir="/pub/incoming" |
|
|
|
userid="coder" |
|
|
|
password="java1" |
|
|
|
passive="yes" |
|
|
|
depends="yes" |
|
|
|
binary="no"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
<pre> <ftp server="ftp.apache.org" |
|
|
|
port="2121" |
|
|
|
remotedir="/pub/incoming" |
|
|
|
userid="coder" |
|
|
|
password="java1" |
|
|
|
passive="yes" |
|
|
|
depends="yes" |
|
|
|
binary="no"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
</fileset> |
|
|
|
</ftp></pre> |
|
|
|
<p>Logs in to <code>ftp.apache.org</code> at port <code>2121</code> as |
|
|
@@ -424,17 +424,17 @@ for <code>anonymous</code>.</p> |
|
|
|
changed HTML files in the <code>htdocs/manual</code> directory to the |
|
|
|
<code>/pub/incoming</code> directory. The files are transferred in text mode. |
|
|
|
Passive mode has been switched on to send files from behind a firewall.</p> |
|
|
|
<pre> <ftp server="ftp.hypothetical.india.org" |
|
|
|
port="2121" |
|
|
|
remotedir="/pub/incoming" |
|
|
|
userid="coder" |
|
|
|
password="java1" |
|
|
|
depends="yes" |
|
|
|
binary="no" |
|
|
|
systemTypeKey="Windows" |
|
|
|
serverTimeZoneConfig="India/Calcutta"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
<pre> <ftp server="ftp.hypothetical.india.org" |
|
|
|
port="2121" |
|
|
|
remotedir="/pub/incoming" |
|
|
|
userid="coder" |
|
|
|
password="java1" |
|
|
|
depends="yes" |
|
|
|
binary="no" |
|
|
|
systemTypeKey="Windows" |
|
|
|
serverTimeZoneConfig="India/Calcutta"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
</fileset> |
|
|
|
</ftp></pre> |
|
|
|
<p>Logs in to a Windows server at <code>ftp.hypothetical.india.org</code> |
|
|
@@ -443,14 +443,14 @@ and uploads all new or changed (accounting for timezone differences) |
|
|
|
HTML files in the <code>htdocs/manual</code> |
|
|
|
directory to the <code>/pub/incoming</code> directory. The files are transferred |
|
|
|
in text mode.</p> |
|
|
|
<pre> <ftp server="ftp.nt.org" |
|
|
|
remotedir="c:\uploads" |
|
|
|
userid="coder" |
|
|
|
password="java1" |
|
|
|
separator="\" |
|
|
|
verbose="yes"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
<pre> <ftp server="ftp.nt.org" |
|
|
|
remotedir="c:\uploads" |
|
|
|
userid="coder" |
|
|
|
password="java1" |
|
|
|
separator="\" |
|
|
|
verbose="yes"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
</fileset> |
|
|
|
</ftp></pre><p>Logs in to the Windows-based <code>ftp.nt.org</code> as |
|
|
|
<code>coder</code> with password <code>java1</code> and uploads all |
|
|
@@ -464,12 +464,12 @@ use the remotedir attribute as the base directory for the files on the |
|
|
|
FTP server, and the dir attribute as the local directory to put the files |
|
|
|
into. The file structure from the FTP site is preserved on the local machine.</p> |
|
|
|
<pre> |
|
|
|
<ftp action="get" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
<ftp action="get" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
</fileset> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
@@ -477,14 +477,14 @@ into. The file structure from the FTP site is preserved on the local machine.</ |
|
|
|
recursively downloads all .html files from default directory for that user |
|
|
|
into the <code>htdocs/manual</code> directory on the local machine.</p> |
|
|
|
<pre> |
|
|
|
<ftp action="get" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
<ftp action="get" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
systemTypeKey="UNIX" |
|
|
|
defaultDateFormatConfig="yyyy-MM-dd HH:mm"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
defaultDateFormatConfig="yyyy-MM-dd HH:mm"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
</fileset> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
@@ -495,15 +495,15 @@ numeric timestamps. |
|
|
|
The <code>systemTypeKey</code> is not necessary here but helps clarify what is |
|
|
|
going on.</p> |
|
|
|
<pre> |
|
|
|
<ftp action="get" |
|
|
|
server="ftp.hypthetical.fr" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
defaultDateFormatConfig="d MMM yyyy" |
|
|
|
recentDateFormatConfig="d MMM HH:mm" |
|
|
|
serverLanguageCodeConfig="fr"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
<ftp action="get" |
|
|
|
server="ftp.hypthetical.fr" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
defaultDateFormatConfig="d MMM yyyy" |
|
|
|
recentDateFormatConfig="d MMM HH:mm" |
|
|
|
serverLanguageCodeConfig="fr"> |
|
|
|
<fileset dir="htdocs/manual"> |
|
|
|
<include name="**/*.html"/> |
|
|
|
</fileset> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
@@ -519,12 +519,12 @@ filesets are relative to the remote directory, not a local directory. In |
|
|
|
fact, the dir attribute of the fileset is ignored completely. |
|
|
|
|
|
|
|
<pre> |
|
|
|
<ftp action="del" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com"> |
|
|
|
<ftp action="del" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com"> |
|
|
|
<fileset> |
|
|
|
<include name="**/*.tmp"/> |
|
|
|
<include name="**/*.tmp"/> |
|
|
|
</fileset> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
@@ -533,13 +533,13 @@ tries to delete all *.tmp files from the default directory for that user. |
|
|
|
If you don't have permission to delete a file, a BuildException is thrown.</p> |
|
|
|
<h3>Listing Files</h3> |
|
|
|
<pre> |
|
|
|
<ftp action="list" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
listing="data/ftp.listing"> |
|
|
|
<ftp action="list" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
listing="data/ftp.listing"> |
|
|
|
<fileset> |
|
|
|
<include name="**"/> |
|
|
|
<include name="**"/> |
|
|
|
</fileset> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
@@ -551,11 +551,11 @@ user. The listing is in whatever format the FTP server normally lists files.</p> |
|
|
|
<p>Note that with the mkdir action, the directory to create is specified using the |
|
|
|
remotedir attribute.</p> |
|
|
|
<pre> |
|
|
|
<ftp action="mkdir" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
remotedir="some/remote/dir"/> |
|
|
|
<ftp action="mkdir" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
remotedir="some/remote/dir"/> |
|
|
|
</pre> |
|
|
|
<p>This creates the directory <code>some/remote/dir</code> beneath the default root |
|
|
|
directory. As with all other actions, the directory separator character must be correct |
|
|
@@ -572,14 +572,14 @@ Also, if you don't have permission to remove a directory, a BuildException is |
|
|
|
thrown. |
|
|
|
|
|
|
|
<pre> |
|
|
|
<ftp action="rmdir" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
remotedir="/somedir" > |
|
|
|
<ftp action="rmdir" |
|
|
|
server="ftp.apache.org" |
|
|
|
userid="anonymous" |
|
|
|
password="me@myorg.com" |
|
|
|
remotedir="/somedir" > |
|
|
|
<fileset> |
|
|
|
<include name="dira"/> |
|
|
|
<include name="dirb/**"/> |
|
|
|
<include name="dira"/> |
|
|
|
<include name="dirb/**"/> |
|
|
|
</fileset> |
|
|
|
</ftp> |
|
|
|
</pre> |
|
|
@@ -594,20 +594,20 @@ Obviously all the files in the tree must have been already deleted. |
|
|
|
</p> |
|
|
|
<p>As an example suppose you want to delete everything contained into |
|
|
|
<code>/somedir</code>, so invoke first the <code><ftp></code> task with |
|
|
|
<code>action="delete"</code>, then with |
|
|
|
<code>action="rmdir"</code> specifying in both cases |
|
|
|
<code>remotedir="/somedir"</code> and |
|
|
|
<code>action="delete"</code>, then with |
|
|
|
<code>action="rmdir"</code> specifying in both cases |
|
|
|
<code>remotedir="/somedir"</code> and |
|
|
|
|
|
|
|
<pre> |
|
|
|
<fileset> |
|
|
|
<include name="**"/> |
|
|
|
<include name="**"/> |
|
|
|
</fileset> |
|
|
|
</pre> |
|
|
|
|
|
|
|
The directory specified in the <code>remotedir</code> parameter is never |
|
|
|
selected for remove, so if you need to remove it, specify its parent in |
|
|
|
<code>remotedir</code> parameter and include it in the |
|
|
|
<code><fileset></code> pattern, like <code>"somedir/**"</code>. |
|
|
|
<code><fileset></code> pattern, like <code>"somedir/**"</code>. |
|
|
|
</p> |
|
|
|
<hr> |
|
|
|
<p align="center">Copyright © 2000-2005 The Apache Software Foundation. All rights |
|
|
|