This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git

commit aa61cbce54378b25102fa41a62d7c3dead1df8cd
Merge: 9e1bd14 f9b44f6
Author: Jaikiran Pai <[email protected]>
AuthorDate: Wed Mar 6 16:53:17 2019 +0530

    Merge 1.9.x branch into master

 WHATSNEW              | 4 ++++
 manual/Tasks/ftp.html | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --cc WHATSNEW
index 166dcd4,68a6a5b..c5d7f58
--- a/WHATSNEW
+++ b/WHATSNEW
@@@ -101,12 -50,12 +101,16 @@@ Other changes
     the library behind the sshexec and scp Ant tasks.
     Github Pull Request #84
  
 + * The "http" condition, now has a "readTimeout" attribute which can be
 +   used to control the amount of time to wait for the read to complete.
 +   Bugzilla Report 63193
 +
+  * ftp task manual has been updated to mention that the remote listing of
+    files honours the followsymlinks attribute.
+    Bugzilla Report 63226
+ 
  
 -Changes from Ant 1.9.12 TO Ant 1.9.13
 +Changes from Ant 1.10.4 TO Ant 1.10.5
  =====================================
  
  Fixed bugs:
diff --cc manual/Tasks/ftp.html
index e587d48,05cb3e3..07e4942
--- a/manual/Tasks/ftp.html
+++ b/manual/Tasks/ftp.html
@@@ -245,365 -333,391 +245,365 @@@ connection.</p
      </td>
    </tr>
    <tr>
 -    <td valign="top">recentDateFormatConfig</td>
 -    <td valign="top">Specify in Java 
 -    <a 
href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html";>
 -     SimpleDateFormat</a> notation,
 -      (e.g. <code>MMM dd hh:mm</code>) the date format used by the FTP server
 -      to parse dates less than a year old.  If not specified (or specified as
 -      <code>""</code>), and if the system type indicated by the system key 
uses
 -      a recent date format, its standard format will be used.<br>
 -      Since ant 1.7
 +    <td>systemTypeKey</td>
 +    <td>Specifies the type of system in use on the server.  Supported values
 +      are <q>UNIX</q>, <q>VMS</q>, <q>WINDOWS</q>, <q>OS/2</q>, 
<q>OS/400</q>, <q>MVS</q>. If not
 +      specified, (or specified as <q></q>) and if no other 
<var>xxxConfig</var> attributes are
 +      specified, the autodetection mechanism based on the FTP 
<code>SYST</code> command will be
 +      used.<br/><em>Since Ant 1.7</em></td>
 +    <td>No, but if any of the following <var>xxxConfig</var> attributes is 
specified, UNIX will be
 +      assumed, even if <q></q> is specified here.
      </td>
 -    <td valign="top" align="center">No</td>
 -  </tr>
 -  <tr>
 -    <td valign="top">serverLanguageCodeConfig</td>
 -    <td valign="top">a <a 
href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt";>
 -      two-letter ISO-639 language code</a> used to specify the
 -      language used by the server to format month names.  This only needs to 
be
 -      specified when the server uses non-numeric abbreviations for months in 
its
 -      date listings in a language other than English.  This appears to be
 -      becoming rarer and rarer, as commonly distributed ftp servers seem
 -      increasingly to use English or all-numeric formats.
 -      Languages supported are:
 +  </tr>
 +  <tr>
 +    <td>serverTimeZoneConfig</td>
 +    <td>Specify as a
 +      Java <a 
href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html";
 +      target="_top">TimeZone</a> identifier, (e.g. <q>GMT</q>, 
<q>America/Chicago</q>
 +      or <q>Asia/Jakarta</q>) the timezone used by the server for timestamps. 
 This enables
 +      timestamp dependency checking even when the server is in a different 
time zone from the
 +      client. Time Zones know, also, about daylight savings time, and do not 
require you to
 +      calculate milliseconds of difference.  If not specified, (or specified 
as <q></q>), the time
 +      zone of the client is assumed.<br/><em>Since Ant 1.7</em></td>
 +    <td>No</td>
 +  </tr>
 +  <tr>
 +    <td>defaultDateFormatConfig</td>
 +    <td>Specify in
 +      Java <a 
href="https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html";
 +      target="_top">SimpleDateFormat</a> notation, (e.g. <q>yyyy-MM-dd</q>), 
the date format
 +      generally used by the FTP server to parse dates.  In some cases this 
will be the only date
 +      format used.  In others, (<q>unix</q> for example) this will be used 
for dates older than a
 +      year old. (See <var>recentDateFormatConfig</var>).  When specified as 
<q></q>, default value
 +      will be used.<br/><em>Since Ant 1.7</em></td>
 +    <td>No; defaults to default date format for the system type indicated
 +      by <var>systemTypeKey</var></td>
 +  </tr>
 +  <tr>
 +    <td>recentDateFormatConfig</td>
 +    <td>Specify in
 +      Java <a 
href="https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html";
 +      target="_top">SimpleDateFormat</a> notation, (e.g. <q>MMM dd hh:mm</q>) 
the date format used
 +      by the FTP server to parse dates less than a year old.  If not 
specified (or specified
 +      as <q></q>), and if the system type indicated by the 
<var>systemTypeKey</var> uses a recent
 +      date format, its standard format will be used.<br/><em>Since Ant 
1.7</em></td>
 +    <td>No</td>
 +  </tr>
 +  <tr>
 +    <td>serverLanguageCodeConfig</td>
 +    <td>a <a href="http://www.mathguide.de/info/tools/languagecode.html"; 
target="_top">two-letter
 +      ISO-639 language code</a> used to specify the language used by the 
server to format month
 +      names.  This only needs to be specified when the server uses 
non-numeric abbreviations for
 +      months in its date listings in a language other than English.  This 
appears to be becoming
 +      rarer and rarer, as commonly distributed FTP servers seem increasingly 
to use English or
 +      all-numeric formats.  Languages supported are:
        <ul>
 -              <li>en - English</li>
 -              <li>fr - French</li>
 -              <li>de - German</li>
 -              <li>it - Italian</li>
 -              <li>es - Spanish</li>
 -              <li>pt - Portuguese</li>
 -              <li>da - Danish</li>
 -              <li>sv - Swedish</li>
 -              <li>no - Norwegian</li>
 -              <li>nl - Dutch</li>
 -              <li>ro - Romanian</li>
 -              <li>sq - Albanian</li>
 -              <li>sh - Serbo-croatian</li>
 -              <li>sk - Slovak</li>
 -              <li>sl - Slovenian</li>
 +        <li><q>en</q>&mdash;English</li>
 +        <li><q>fr</q>&mdash;French</li>
 +        <li><q>de</q>&mdash;German</li>
 +        <li><q>it</q>&mdash;Italian</li>
 +        <li><q>es</q>&mdash;Spanish</li>
 +        <li><q>pt</q>&mdash;Portuguese</li>
 +        <li><q>da</q>&mdash;Danish</li>
 +        <li><q>sv</q>&mdash;Swedish</li>
 +        <li><q>no</q>&mdash;Norwegian</li>
 +        <li><q>nl</q>&mdash;Dutch</li>
 +        <li><q>ro</q>&mdash;Romanian</li>
 +        <li><q>sq</q>&mdash;Albanian</li>
 +        <li><q>sh</q>&mdash;Serbo-Croatian</li>
 +        <li><q>sk</q>&mdash;Slovak</li>
 +        <li><q>sl</q>&mdash;Slovenian</li>
        </ul>
 -      If you require a language other than the above, see also the
 -      <b>shortMonthNamesConfig</b> attribute.<br>
 -      Since ant 1.7
 -    </td>
 -
 -    <td valign="top" align="center">No</td>
 +      If you require a language other than the above, see also the 
<var>shortMonthNamesConfig</var>
 +      attribute.<br/><em>Since Ant 1.7</em></td>
 +    <td>No</td>
    </tr>
    <tr>
 -    <td valign="top">shortMonthNamesConfig</td>
 -    <td valign="top">specify the month abbreviations used on the server in 
file
 -      timestamp dates as a pipe-delimited string for each month. For example,
 -      a set of month names used by a hypothetical
 -      Icelandic FTP server might conceivably be specified as
 -      
<code>"jan|feb|mar|apr|ma&#xED;|j&#xFA;n|j&#xFA;l|&#xE1;g&#xFA;|sep|okt|n&#xF3;v|des"</code>.
 +    <td>shortMonthNamesConfig</td>
 +    <td>specify the month abbreviations used on the server in file timestamp 
dates as a
 +      pipe-delimited string for each month. For example, a set of month names 
used by a hypothetical
 +      Icelandic FTP server might conceivably be specified
 +      as 
<q>jan|feb|mar|apr|ma&iacute;|j&uacute;n|j&uacute;l|&aacute;g&uacute;|sep|okt|n&oacute;v|des</q>.
        This attribute exists primarily to support languages not supported by
 -      the <b>serverLanguageCode</b> attribute.<br>
 -      Since ant 1.7
 -    </td>
 -    <td valign="top" align="center">No</td>
 +      the <var>serverLanguageCode</var> attribute.<br/><em>Since Ant 
1.7</em></td>
 +    <td>No</td>
    </tr>
  </table>
 -<h3>Note about remotedir attribute</h3>
 -<table  border="1" cellpadding="2" cellspacing="0"
 - >
 -  <tbody>
 +<h3>Note about <var>remotedir</var> attribute</h3>
 +<table>
 +  <thead>
      <tr>
 -      <td style="vertical-align: top;" width="20%">Action<br>
 -      </td>
 -      <td style="vertical-align: top;" width="40%">meaning of 
<code>remotedir</code><br>
 -      </td>
 -      <td style="vertical-align: top;">use of nested <code>fileset</code>
 -(s)<br>
 -      </td>
 +      <th scope="col">Action</th>
 +      <th scope="col">meaning of <var>remotedir</var></th>
 +      <th scope="col">use of nested <var>fileset</var>(s)</th>
      </tr>
 +  </thead>
 +  <tbody>
      <tr>
 -      <td style="vertical-align: top;" width="20%">send/put<br>
 -      </td>
 -      <td style="vertical-align: top;" width="40%">base directory to
 -which the files are sent<br>
 -      </td>
 -      <td style="vertical-align: top;">they are used normally and
 -evaluated on the local machine<br>
 -      </td>
 +      <td><q>send</q>/<q>put</q></td>
 +      <td>base directory to which the files are sent</td>
 +      <td>they are used normally and evaluated on the local machine</td>
      </tr>
      <tr>
 -      <td style="vertical-align: top;" width="20%">recv/get<br>
 -      </td>
 -      <td style="vertical-align: top;" width="40%">base directory from
 -which the files are retrieved<br>
 -      </td>
 -      <td style="vertical-align: top;">the remote files located under
 -the <code>remotedir </code>matching the include/exclude patterns of
 -the <code>fileset&nbsp;</code></td>
 +      <td><q>recv</q>/<q>get</q></td>
 +      <td>base directory from which the files are retrieved</td>
 +      <td>the remote files located under the <var>remotedir</var> matching 
the include/exclude
 +        patterns of the <var>fileset</var></td>
      </tr>
      <tr>
 -      <td style="vertical-align: top;" width="20%">del/delete<br>
 -      </td>
 -      <td style="vertical-align: top;" width="40%">base directory from
 -which files get deleted<br>
 -      </td>
 -      <td style="vertical-align: top;">the remote files located under
 -the <code>remotedir </code>matching the include/exclude patterns of
 -the <code>fileset <br>
 -      </code></td>
 +      <td><q>del</q>/<q>delete</q></td>
 +      <td>base directory from which files get deleted</td>
 +      <td>the remote files located under the <var>remotedir</var> matching 
the include/exclude
 +        patterns of the <var>fileset</var></td>
      </tr>
      <tr>
 -      <td style="vertical-align: top;" width="20%">list<br>
 -      </td>
 -      <td style="vertical-align: top;" width="40%">base directory from
 -which files are listed<br>
 -      </td>
 -      <td style="vertical-align: top;">the remote files located under
 -the <code>remotedir </code>matching the include/exclude patterns of
 -the <code>fileset <br>
 -      </code></td>
 +      <td><q>list</q></td>
 +      <td>base directory from which files are listed</td>
 +      <td>the remote files located under the <var>remotedir</var> matching 
the include/exclude
 +        patterns of the <var>fileset</var></td>
      </tr>
      <tr>
 -      <td style="vertical-align: top;" width="20%">mkdir</td>
 -      <td style="vertical-align: top;" width="40%">directory to create<br>
 -      </td>
 -      <td style="vertical-align: top;">not used<br>
 -      </td>
 +      <td><q>mkdir</q></td>
 +      <td>directory to create</td>
 +      <td><em>not used</em></td>
      </tr>
      <tr>
 -      <td style="vertical-align: top;" width="20%">chmod</td>
 -      <td style="vertical-align: top;" width="40%">base directory from
 -which the mode of files get changed<br>
 -      </td>
 -      <td style="vertical-align: top;">the remote files located under
 -the <code>remotedir </code>matching the include/exclude patterns of
 -the <code>fileset <br>
 -      </code></td>
 +      <td><q>chmod</q></td>
 +      <td>base directory from which the mode of files get changed</td>
 +      <td>the remote files located under the <var>remotedir</var> matching 
the include/exclude
 +        patterns of the <var>fileset</var></td>
      </tr>
      <tr>
 -      <td style="vertical-align: top;" width="20%">rmdir<br>
 -      </td>
 -      <td style="vertical-align: top;" width="40%">base directory from
 -which directories get removed<br>
 -      </td>
 -      <td style="vertical-align: top;">the remote directories located
 -under the <code>remotedir </code>matching the include/exclude
 -patterns of the <code>fileset <br>
 -      </code></td>
 +      <td><q>rmdir</q></td>
 +      <td>base directory from which directories get removed</td>
 +      <td>the remote directories located under the <var>remotedir</var> 
matching the include/exclude
 +        patterns of the <var>fileset</var></td>
      </tr>
    </tbody>
 -</table><h3>Parameters specified as nested elements</h3>
 +</table>
 +<h3>Parameters specified as nested elements</h3>
  <h4>fileset</h4>
 -<p>The ftp task supports any number of nested <a
 -href="../Types/fileset.html"><code>&lt;fileset&gt;</code></a> elements to 
specify
 -the files to be retrieved, or deleted, or listed, or whose mode you want to 
change.</p>
 -<p>
 -The attribute <code>followsymlinks</code> of <code>fileset</code> is 
supported on
 -local (put) as well as remote (get, chmod, delete, list) filesets.
 -<em>Before ant 1.6 there was no support of symbolic links in remote filesets.
 -In order to exclude symbolic links (preserve the behavior of ant 1.5.x and 
older),
 -you need to explicitly set <code>followsymlinks</code> to 
<code>false</code>.</em>
 -On remote filesets hidden files are not checked for being symbolic links. 
Hidden
 -files are currently assumed to not be symbolic links.
 -</p>
 +<p>The <code>ftp</code> task supports any number of
 +nested <a href="../Types/fileset.html"><code>&lt;fileset&gt;</code></a> 
elements to specify the
 +files to be retrieved, or deleted, or listed, or whose mode you want to 
change.</p>
 +<p>The attribute <var>followsymlinks</var> of <code>fileset</code> is 
supported on local
- (<q>put</q>) as well as remote (<q>get</q>, <q>chmod</q>, <q>delete</q>) 
filesets.  <em>Before Ant
++(<q>put</q>) as well as remote (<q>get</q>, <q>chmod</q>, <q>delete</q>, 
<q>list</q>) filesets.  <em>Before Ant
 +1.6 there was no support of symbolic links in remote filesets.  In order to 
exclude symbolic links
 +(preserve the behavior of Ant 1.5.x and older), you need to explicitly set 
<var>followsymlinks</var>
 +to <q>false</q>.</em>  On remote filesets hidden files are not checked for 
being symbolic links.
 +Hidden files are currently assumed to not be symbolic links.</p>
  
 -<h3>Sending Files</h3>
 -<p>The easiest way to describe how to send files is with a couple of 
examples:</p>
 +<h3>Sending files</h3>
 +<p>The easiest way to describe how to send files is with a couple of 
examples.</p>
 +<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and upload 
all files in
 +the <samp>htdocs/manual</samp> directory to the default directory for that 
user.</p>
  <pre>
 -  &lt;ftp server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"&gt;
 +&lt;ftp server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"&gt;
      &lt;fileset dir="htdocs/manual"/&gt;
 -  &lt;/ftp&gt;
 -</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>  &lt;ftp server="ftp.apache.org"
 -       remotedir="incoming"
 -       userid="anonymous"
 -       password="[email protected]"
 -       depends="yes"&gt;
 +&lt;/ftp&gt;</pre>
 +
 +<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and upload 
all new or changed
 +files in the <samp>htdocs/manual</samp> directory to the 
<samp>incoming</samp> directory relative to
 +the default directory for <samp>anonymous</samp>.</p>
 +<pre>
 +&lt;ftp server="ftp.apache.org"
 +     remotedir="incoming"
 +     userid="anonymous"
 +     password="[email protected]"
 +     depends="yes"&gt;
      &lt;fileset dir="htdocs/manual"/&gt;
 -  &lt;/ftp&gt;</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>  &lt;ftp server="ftp.apache.org"
 -       port="2121"
 -       remotedir="/pub/incoming"
 -       userid="coder"
 -       password="java1"
 -       passive="yes"
 -       depends="yes"
 -       binary="no"&gt;
 +&lt;/ftp&gt;</pre>
 +
 +<p>Log in to <samp>ftp.apache.org</samp> at port <samp>2121</samp> as 
<samp>coder</samp> with
 +password <samp>java1</samp> and upload all new or changed HTML files in
 +the <samp>htdocs/manual</samp> directory to the <samp>/pub/incoming</samp> 
directory. The files are
 +transferred in text mode.  Passive mode has been switched on to send files 
from behind a
 +firewall.</p>
 +<pre>
 +&lt;ftp server="ftp.apache.org"
 +     port="2121"
 +     remotedir="/pub/incoming"
 +     userid="coder"
 +     password="java1"
 +     passive="yes"
 +     depends="yes"
 +     binary="no"&gt;
      &lt;fileset dir="htdocs/manual"&gt;
 -      &lt;include name="**/*.html"/&gt;
 +        &lt;include name="**/*.html"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;</pre>
 -<p>Logs in to <code>ftp.apache.org</code> at port <code>2121</code> as
 -<code>coder</code> with password <code>java1</code> and uploads all new or
 -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>  &lt;ftp server="ftp.hypothetical.india.org"
 -       port="2121"
 -       remotedir="/pub/incoming"
 -       userid="coder"
 -       password="java1"
 -       depends="yes"
 -       binary="no"
 -       systemTypeKey="Windows"
 -       serverTimeZoneConfig="India/Calcutta"&gt;
 +&lt;/ftp&gt;</pre>
 +
 +<p>Log in to a Windows server at <samp>ftp.hypothetical.india.org</samp> at 
port <samp>2121</samp>
 +as <samp>coder</samp> with password <samp>java1</samp> and upload all new or 
changed (accounting for
 +timezone differences) HTML files in the <samp>htdocs/manual</samp> directory 
to
 +the <samp>/pub/incoming</samp> directory. The files are transferred in text 
mode.</p>
 +<pre>
 +&lt;ftp server="ftp.hypothetical.india.org"
 +     port="2121"
 +     remotedir="/pub/incoming"
 +     userid="coder"
 +     password="java1"
 +     depends="yes"
 +     binary="no"
 +     systemTypeKey="Windows"
 +     serverTimeZoneConfig="India/Calcutta"&gt;
      &lt;fileset dir="htdocs/manual"&gt;
 -      &lt;include name="**/*.html"/&gt;
 +        &lt;include name="**/*.html"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;</pre>
 -<p>Logs in to a Windows server at <code>ftp.hypothetical.india.org</code>
 -at port <code>2121</code> as <code>coder</code> with password 
<code>java1</code>
 -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>  &lt;ftp server="ftp.nt.org"
 -       remotedir="c:\uploads"
 -       userid="coder"
 -       password="java1"
 -       separator="\"
 -       verbose="yes"&gt;
 +&lt;/ftp&gt;</pre>
 +
 +<p>Log in to the Windows-based <samp>ftp.nt.org</samp> as <samp>coder</samp> 
with
 +password <samp>java1</samp> and upload all HTML files in the 
<samp>htdocs/manual</samp> directory to
 +the <samp>c:\uploads</samp> directory. Progress messages are displayed as 
each file is uploaded.</p>
 +<pre>
 +&lt;ftp server="ftp.nt.org"
 +     remotedir="c:\uploads"
 +     userid="coder"
 +     password="java1"
 +     separator="\"
 +     verbose="yes"&gt;
      &lt;fileset dir="htdocs/manual"&gt;
 -      &lt;include name="**/*.html"/&gt;
 +        &lt;include name="**/*.html"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;</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 
 -HTML files in the <code>htdocs/manual</code> directory to the 
 -<code>c:\uploads</code> directory.  Progress messages are displayed as each
 -file is uploaded.</p>
 -<h3>Getting Files</h3>
 -<p>Getting files from an FTP server works pretty much the same way as 
 -sending them does.  The only difference is that the nested filesets
 -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>
 +&lt;/ftp&gt;</pre>
 +
 +<h3>Getting files</h3>
 +<p>Getting files from an FTP server works pretty much the same way as sending 
them does. The only
 +difference is that the nested filesets use the <var>remotedir</var> attribute 
as the base directory
 +for the files on the FTP server, and the <var>dir</var> attribute as the 
local directory to put the
 +files into. The file structure from the FTP site is preserved on the local 
machine.</p>
 +
 +<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and 
recursively download
 +all <samp>.html</samp> files from default directory for that user into
 +the <samp>htdocs/manual</samp> directory on the local machine.</p>
  <pre>
 -  &lt;ftp action="get"
 -       server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"&gt;
 +&lt;ftp action="get"
 +     server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"&gt;
      &lt;fileset dir="htdocs/manual"&gt;
 -      &lt;include name="**/*.html"/&gt;
 +        &lt;include name="**/*.html"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;
 -</pre>
 -<p>Logs in to <code>ftp.apache.org</code> as <code>anonymous</code> and 
 -recursively downloads all .html files from default directory for that user 
 -into the <code>htdocs/manual</code> directory on the local machine.</p>
 +&lt;/ftp&gt;</pre>
 +
 +<p>If <samp>apache.org</samp> ever switches to a Unix FTP server that uses 
the new all-numeric
 +format for timestamps, this version would become necessary. It would 
accomplish the same
 +functionality as the previous example but would successfully handle the 
numeric
 +timestamps. The <var>systemTypeKey</var> is not necessary here but helps 
clarify what is going
 +on.</p>
  <pre>
 -  &lt;ftp action="get"
 -       server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"
 -       systemTypeKey="UNIX"
 -       defaultDateFormatConfig="yyyy-MM-dd HH:mm"&gt;
 +&lt;ftp action="get"
 +     server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"
 +     systemTypeKey="UNIX"
 +     defaultDateFormatConfig="yyyy-MM-dd HH:mm"&gt;
      &lt;fileset dir="htdocs/manual"&gt;
 -      &lt;include name="**/*.html"/&gt;
 +        &lt;include name="**/*.html"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;
 -</pre>
 -<p>If apache.org ever switches to a unix FTP server that uses the new 
all-numeric
 -format for timestamps, this version would become necessary.  It would 
accomplish
 -the same functionality as the previous example but would successfully handle 
the
 -numeric timestamps.
 -The <code>systemTypeKey</code> is not necessary here but helps clarify what is
 -going on.</p>
 +&lt;/ftp&gt;</pre>
 +
 +<p>Log into a UNIX FTP server at <samp>ftp.hypothetical.fr</samp> which 
displays dates with French
 +names in Standard European format, as <samp>anonymous</samp>, and recursively 
download
 +all <samp>.html</samp> files from default directory for that user into
 +the <samp>htdocs/manual</samp> directory on the local machine.</p>
  <pre>
 -  &lt;ftp action="get"
 -       server="ftp.hypthetical.fr"
 -       userid="anonymous"
 -       password="[email protected]"
 -       defaultDateFormatConfig="d MMM yyyy"
 -       recentDateFormatConfig="d MMM HH:mm"
 -       serverLanguageCodeConfig="fr"&gt;
 -     &lt;fileset dir="htdocs/manual"&gt;
 -      &lt;include name="**/*.html"/&gt;
 +&lt;ftp action="get"
 +     server="ftp.hypthetical.fr"
 +     userid="anonymous"
 +     password="[email protected]"
 +     defaultDateFormatConfig="d MMM yyyy"
 +     recentDateFormatConfig="d MMM HH:mm"
 +     serverLanguageCodeConfig="fr"&gt;
 +    &lt;fileset dir="htdocs/manual"&gt;
 +        &lt;include name="**/*.html"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;
 -</pre>
 -<p>Logs into a UNIX FTP server at <code>ftp.hypothetical.fr</code> which 
displays
 -dates with French names in Standard European format, as 
<code>anonymous</code>, and
 -recursively downloads all .html files from default directory for that user
 -into the <code>htdocs/manual</code> directory on the local machine.</p>
 +&lt;/ftp&gt;</pre>
  
 -<h3>Deleting Files</h3>
 -As you've probably guessed by now, you use nested fileset elements to 
 -select the files to delete from the remote FTP server.  Again, the 
 -filesets are relative to the remote directory, not a local directory.  In
 -fact, the dir attribute of the fileset is ignored completely.
 +<h3>Deleting files</h3>
 +<p>As you've probably guessed by now, you use nested fileset elements to 
select the files to delete
 +from the remote FTP server.  Again, the filesets are relative to the remote 
directory, not a local
 +directory.  In fact, the <var>dir</var> attribute of the fileset is ignored 
completely.</p>
  
 +<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and try to 
delete
 +all <samp>*.tmp</samp> files from the default directory for that user.  If 
you don't have permission
 +to delete a file, a <code>BuildException</code> is thrown.</p>
  <pre>
 -  &lt;ftp action="del"
 -       server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"&gt;
 +&lt;ftp action="del"
 +     server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"&gt;
      &lt;fileset&gt;
 -      &lt;include name="**/*.tmp"/&gt;
 +        &lt;include name="**/*.tmp"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;
 -</pre>
 -<p>Logs in to <code>ftp.apache.org</code> as <code>anonymous</code> and
 -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>
 +&lt;/ftp&gt;</pre>
 +
  <h3>Listing Files</h3>
 +<p>Get a file listing in <samp>data/ftp.listing</samp> of all the files on 
the FTP server relative
 +to the default directory of the <samp>anonymous</samp> user. The listing is 
in whatever format the
 +FTP server normally lists files.</p>
  <pre>
 -  &lt;ftp action="list"
 -       server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"
 -       listing="data/ftp.listing"&gt;
 +&lt;ftp action="list"
 +     server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"
 +     listing="data/ftp.listing"&gt;
      &lt;fileset&gt;
 -      &lt;include name="**"/&gt;
 +        &lt;include name="**"/&gt;
      &lt;/fileset&gt;
 -  &lt;/ftp&gt;
 -</pre>
 -<p>This provides a file listing in <code>data/ftp.listing</code> of all the 
files on
 -the FTP server relative to the default directory of the <code>anonymous</code>
 -user. The listing is in whatever format the FTP server normally lists 
files.</p>
 +&lt;/ftp&gt;</pre>
  
 -<h3>Creating Directories</h3>
 -<p>Note that with the mkdir action, the directory to create is specified 
using the
 -remotedir attribute.</p>
 +<h3>Creating directories</h3>
 +<p>Note that with the <q>mkdir</q> action, the directory to create is 
specified using
 +the <var>remotedir</var> attribute.</p>
 +<p>Create the directory <samp>some/remote/dir</samp> beneath the default root 
directory. As with all
 +other actions, the directory separator character must be correct according to 
the desires of the FTP
 +server.</p>
  <pre>
 -  &lt;ftp action="mkdir"
 -       server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"
 -       remotedir="some/remote/dir"/&gt;
 -</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
 -according to the desires of the FTP server.</p>
 -<h3>Removing Directories</h3>
 -This action uses nested fileset elements to 
 -select the directories to remove from the remote FTP server.  The 
 -filesets are relative to the remote directory, not a local directory. 
 -The dir attribute of the fileset is ignored completely.
 -The directories to be removed must be empty, or contain only
 -other directories that have been also selected to be removed by the filesets
 -patterns, otherwise a BuildException will be thrown.
 -Also, if you don't have permission to remove a directory, a BuildException is 
 -thrown.
 +&lt;ftp action="mkdir"
 +     server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"
 +     remotedir="some/remote/dir"/&gt;</pre>
  
 -<pre>
 -  &lt;ftp action="rmdir"
 -       server="ftp.apache.org"
 -       userid="anonymous"
 -       password="[email protected]"
 -       remotedir="/somedir" &gt;
 -    &lt;fileset&gt;
 -      &lt;include name="dira"/&gt;
 -      &lt;include name="dirb/**"/&gt;
 -    &lt;/fileset&gt;
 -  &lt;/ftp&gt;
 -</pre>
 -<p>Logs in to <code>ftp.apache.org</code> as <code>anonymous</code> and
 -tries to remove <code>/somedir/dira</code> directory and
 -all the directories tree starting at, and including, 
<code>/somedir/dirb</code>.
 -When removing the <code>/somedir/dirb</code> tree,
 -it will start at the leaves moving up to the root, so that when
 -it tries to remove a directory it is sure all the directories under it are
 -already removed.
 -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>&lt;ftp&gt;</code> task with
 -<code>action="delete"</code>, then with
 -<code>action="rmdir"</code> specifying in both cases
 -<code>remotedir="/somedir"</code> and
 +<h3>Removing directories</h3>
 +<p>This action uses nested fileset elements to select the directories to 
remove from the remote FTP
 +server. The filesets are relative to the remote directory, not a local 
directory. The <var>dir</var>
 +attribute of the fileset is ignored completely. The directories to be removed 
must be empty, or
 +contain only other directories that have been also selected to be removed by 
the filesets patterns,
 +otherwise a <code>BuildException</code> will be thrown. Also, if you don't 
have permission to remove
 +a directory, a <code>BuildException</code> is thrown.</p>
  
 +<p>Log in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and try to
 +remove <samp>/somedir/dira</samp> directory and all the directory tree 
starting at, and
 +including, <samp>/somedir/dirb</samp>.  When removing the 
<samp>/somedir/dirb</samp> tree, the task
 +starts at the leaves moving up to the root, so that when it tries to remove a 
directory it is sure
 +all the directories under it are already removed.  Obviously all the files in 
the tree must have
 +been already deleted.</p>
  <pre>
 +&lt;ftp action="rmdir"
 +     server="ftp.apache.org"
 +     userid="anonymous"
 +     password="[email protected]"
 +     remotedir="/somedir" &gt;
      &lt;fileset&gt;
 -        &lt;include name="**"/&gt;
 +        &lt;include name="dira"/&gt;
 +        &lt;include name="dirb/**"/&gt;
      &lt;/fileset&gt;
 -</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>&lt;fileset&gt;</code> pattern, like <code>"somedir/**"</code>.
 -</p>
 -
 +&lt;/ftp&gt;</pre>
 +<p>As an example suppose you want to delete everything contained in 
<samp>/somedir</samp>, so invoke
 +first the <code>&lt;ftp&gt;</code> task with <var>action</var>=<q>delete</q>, 
then
 +with <var>action</var>=<q>rmdir</q> specifying in both cases 
<var>remotedir</var>=<q>/somedir</q>
 +and</p>
 +<pre>
 +&lt;fileset&gt;
 +    &lt;include name="**"/&gt;
 +&lt;/fileset&gt;</pre>
 +<p>The directory specified in the <var>remotedir</var> parameter is never 
selected for remove, so if
 +you need to remove it, specify its parent in <var>remotedir</var> parameter 
and include it in the
 +<code>&lt;fileset&gt;</code> pattern, like <samp>somedir/**</samp>.</p>
  
  </body>
  </html>

Reply via email to