@@ -846,6 +846,7 @@ same patterns as the example before.</p>
<li><a href="#antstructure">AntStructure</a></li>
<li><a href="#antstructure">AntStructure</a></li>
<li><a href="#available">Available</a></li>
<li><a href="#available">Available</a></li>
<li><a href="#chmod">Chmod</a></li>
<li><a href="#chmod">Chmod</a></li>
<li><a href="#copy">Copy</a></li>
<li><a href="#copydir">Copydir</a></li>
<li><a href="#copydir">Copydir</a></li>
<li><a href="#copyfile">Copyfile</a></li>
<li><a href="#copyfile">Copyfile</a></li>
<li><a href="#cvs">Cvs</a></li>
<li><a href="#cvs">Cvs</a></li>
@@ -867,6 +868,7 @@ same patterns as the example before.</p>
<li><a href="#javadoc">Javadoc/Javadoc2</a></li>
<li><a href="#javadoc">Javadoc/Javadoc2</a></li>
<li><a href="#mail">Mail</a></li>
<li><a href="#mail">Mail</a></li>
<li><a href="#mkdir">Mkdir</a></li>
<li><a href="#mkdir">Mkdir</a></li>
<li><a href="#move">Move</a></li>
<li><a href="#patch">Patch</a></li>
<li><a href="#patch">Patch</a></li>
<li><a href="#property">Property</a></li>
<li><a href="#property">Property</a></li>
<li><a href="#rename">Rename</a></li>
<li><a href="#rename">Rename</a></li>
@@ -1172,7 +1174,91 @@ group on a UNIX system. In addition all files belonging to a FileSet
with <code>id</code> <code>other.shared.sources</code> get the same
with <code>id</code> <code>other.shared.sources</code> get the same
permissions.</p>
permissions.</p>
<hr>
<hr>
<h2><a name="copy">Copy</a></h2>
<h3>Description</h3>
<p>Copies a file or directory to a new file or directory. Files are
only copied if the source file is newer than the destination file,
or when the destination file does not exist. However, you can explicitly
overwrite files with the <var>overwrite</var> attribute.</p>
<p><a href="#fileset">FileSet</a>s are used to select files to copy.
To use a fileset, the <var>todir</var> attribute must be set.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">file</td>
<td valign="top">the file to copy</td>
<td valign="top" align="center" rowspan="2">One of <var>file</var> or
<var>dir</var> are required, or at least one nested fileset element.</td>
</tr>
<tr>
<td valign="top">dir</td>
<td valign="top">the directory to copy</td>
</tr>
<tr>
<td valign="top">tofile</td>
<td valign="top">the file to copy to</td>
<td valign="top" align="center" rowspan="2">With the <var>file</var> attribute,
either <var>tofile</var> or <var>todir</var> can be used. With the <var>dir</var>
attribute and nested filesets, only <var>todir</var> is allowed.</td>
</tr>
<tr>
<td valign="top">todir</td>
<td valign="top">the directory to copy to</td>
</tr>
<tr>
<td valign="top">overwrite</td>
<td valign="top">overwrite existing files even if the destination
files are newer (default is no)</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">filtering</td>
<td valign="top">indicates whether token filtering should take place during
the copy (default is no)</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">flatten</td>
<td valign="top">ignore directory structure of source directory,
copy all files into a single directory, specified by the <var>todir</var>
attribute (default is false)</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Examples</h3>
<p><b>Copy a single file</b></p>
<pre>
<copy file="myfile.txt" tofile="mycopy.txt" />
</pre>
<p><b>Copy a file to a directory</b></p>
<pre>
<copy file="myfile.txt" todir="../some/dir/tree" />
</pre>
<p><b>Copy a directory to another directory</b></p>
<pre>
<copy dir="src_dir" todir="../new/dir" />
</pre>
<p><b>Copy a set of files to a directory</b></p>
<pre>
<copy todir="../dest/dir" >
<fileset dir="src_dir" >
<exclude name="**/*.java" />
</fileset>
</copy>
<copy todir="../dest/dir" >
<fileset dir="src_dir" excludes="**/*.java" />
</copy>
</pre>
<hr>
<h2><a name="copydir">Copydir</a></h2>
<h2><a name="copydir">Copydir</a></h2>
<h3><i>Deprecated</i></h3>
<p><i>This task has been deprecated. Use the Copy task instead.</i></p>
<h3>Description</h3>
<h3>Description</h3>
<p>Copies a directory tree from the source to the destination.</p>
<p>Copies a directory tree from the source to the destination.</p>
<p>It is possible to refine the set of files that are being copied. This can be
<p>It is possible to refine the set of files that are being copied. This can be
@@ -1277,6 +1363,8 @@ recursively. All java files are copied, except for the files under the <code>myp
directory.</p>
directory.</p>
<hr>
<hr>
<h2><a name="copyfile">Copyfile</a></h2>
<h2><a name="copyfile">Copyfile</a></h2>
<h3><i>Deprecated</i></h3>
<p><i>This task has been deprecated. Use the Copy task instead.</i></p>
<h3>Description</h3>
<h3>Description</h3>
<p>Copies a file from the source to the destination. The file is only copied if
<p>Copies a file from the source to the destination. The file is only copied if
the source file is newer than the destination file, or when the destination file
the source file is newer than the destination file, or when the destination file
@@ -1396,21 +1484,9 @@ repository pointed to by the cvsRoot attribute, and stores the files in "${
<hr>
<hr>
<h2><a name="delete">Delete</a></h2>
<h2><a name="delete">Delete</a></h2>
<h3>Description</h3>
<h3>Description</h3>
<p>Deletes either a single file or
all files in a specified directory and its sub-directories.</p>
<p>It is possible to refine the set of files that are being deleted. This can be
done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
have included in the deletion process by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
the files you want to have excluded from the deletion process. This is also done with patterns. And
finally with the <i>defaultexcludes</i> attribute, you can specify whether you
want to use default exclusions or not. See the section on <a
href="#directorybasedtasks">directory based tasks</a>, on how the
inclusion/exclusion of files works, and how to write patterns.</p>
<p>This task forms an implicit <a href="#fileset">FileSet</a> and
supports all attributes of <code><fileset></code> as well as the
nested <code><include></code>, <code><exclude></code> and
<code><patternset></code> elements.</p>
<p>Deletes either a single file, all files in a specified directory and its
sub-directories, or a set of files specified by one or more <a href="#fileset">FileSet</a>s.
When specifying a set of files, empty directories are <em>not</em> removed.</p>
<h3>Parameters</h3>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<tr>
@@ -1427,57 +1503,59 @@ nested <code><include></code>, <code><exclude></code> and
<td valign="top">dir</td>
<td valign="top">dir</td>
<td valign="top">The directory to delete files from.</td>
<td valign="top">The directory to delete files from.</td>
</tr>
</tr>
<tr>
<td valign="top">verbose</td>
<td valign="top">Show name of each deleted file ("true"/"false").
Default is "false" when omitted.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<tr>
<td valign="top">includes</td>
<td valign="top">includes</td>
<td valign="top">Comma separated list of patterns of files that must be
<td valign="top"><i>Deprecated.</i> Comma separated list of patterns of files that must be
deleted. All files are in the current directory
deleted. All files are in the current directory
and any sub-directories are deleted when omitted.</td>
and any sub-directories are deleted when omitted.</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">includesfile</td>
<td valign="top">includesfile</td>
<td valign="top">the name of a file. Each line of this file is
<td valign="top"><i>Depreca ted.</i> T he name of a file. Each line of this file is
taken to be an include pattern</td>
taken to be an include pattern</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">excludes</td>
<td valign="top">excludes</td>
<td valign="top">Comma separated list of patterns of files that must be
<td valign="top"><i>Deprecated.</i> Comma separated list of patterns of files that must be
excluded from the deletion list. No files (except default excludes) are excluded when omitted.</td>
excluded from the deletion list. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">excludesfile</td>
<td valign="top">excludesfile</td>
<td valign="top">the name of a file. Each line of this file is
<td valign="top"><i>Depreca ted.</i> T he name of a file. Each line of this file is
taken to be an exclude pattern</td>
taken to be an exclude pattern</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top">defaultexcludes</td>
<td valign="top">defaultexcludes</td>
<td valign="top">Indicates whether default excludes should be used or not
<td valign="top"><i>Deprecated.</i> Indicates whether default excludes should be used or not
("yes"/"no"). Default excludes are used when omitted.</td>
("yes"/"no"). Default excludes are used when omitted.</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No</td>
</tr>
</tr>
<tr>
<td valign="top">verbose</td>
<td valign="top">Show name of each deleted file ("true"/"false").
Default is "false" when omitted.</td>
<td align="center" valign="top">No</td>
</tr>
</table>
</table>
<h3>Examples</h3>
<h3>Examples</h3>
<pre> <delete file="/lib/ant.jar" /></pre>
<pre> <delete file="/lib/ant.jar" /></pre>
<p>deletes the file <code>/lib/ant.jar</code>.</p>
<p>deletes the file <code>/lib/ant.jar</code>.</p>
<pre> <delete dir="lib" /></pre>
<pre> <delete dir="lib" /></pre>
<p>deletes all files in the <code>/lib</code> directory.</p>
<p>deletes all files in the <code>/lib</code> directory.</p>
<pre> <delete dir=".&quo t;
includes="**/*.bak&quo t;
/>
<pre> <delete&g t;
<fileset dir="." includes="**/*.bak" /&g t;
< /delete >
</pre>
</pre>
<p>deletes all files with the extension "<code>.bak</code>" from the current directory
<p>deletes all files with the extension "<code>.bak</code>" from the current directory
and any sub-directories.</p>
and any sub-directories.</p>
<hr>
<hr>
<h2><a name="deltree">Deltree</a></h2>
<h2><a name="deltree">Deltree</a></h2>
<h3><i>Deprecated</i></h3>
<p><i>This task has been deprecated. Use the Delete task instead.</i></p>
<h3>Description</h3>
<h3>Description</h3>
<p>Deletes a directory with all its files and subdirectories.</p>
<p>Deletes a directory with all its files and subdirectories.</p>
<h3>Parameters</h3>
<h3>Parameters</h3>
@@ -3135,6 +3213,88 @@ necessary.</p>
<pre><mkdir dir="${dist}/lib" /></pre>
<pre><mkdir dir="${dist}/lib" /></pre>
<p>creates a directory <code>${dist}/lib</code>.</p>
<p>creates a directory <code>${dist}/lib</code>.</p>
<hr>
<hr>
<h2><a name="move">Move</a></h2>
<h3>Description</h3>
<p>Moves a file or directory to a new file or directory, or sets of files to
a new directory. By default, the
destination file is overwritten if it already exists. When <var>overwrite</var> is
turned off, then files are only moved if the source file is newer than
the destination file, or when the destination file does not exist.</p>
<p><a href="#fileset">FileSet</a>s are used to select sets of files
to move to the <var>todir</var> directory.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">file</td>
<td valign="top">the file to move</td>
<td valign="top" align="center" rowspan="2">One of <var>file</var> or
<var>dir</var> are required, or at least one nested fileset element</td>
</tr>
<tr>
<td valign="top">dir</td>
<td valign="top">the directory to move</td>
</tr>
<tr>
<td valign="top">tofile</td>
<td valign="top">the file to move to</td>
<td valign="top" align="center" rowspan="2">With the <var>file</var> attribute,
either <var>tofile</var> or <var>todir</var> can be used. With the <var>dir</var>
attribute or a nested fileset, only <var>todir</var> is allowed.</td>
</tr>
<tr>
<td valign="top">todir</td>
<td valign="top">the directory to move to</td>
</tr>
<tr>
<td valign="top">overwrite</td>
<td valign="top">overwrite existing files even if the destination
files are newer (default is "true")</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">filtering</td>
<td valign="top">indicates whether token filtering should take place during
the move. See the <a href="#filter">filter</a> task for a description of
how filters work.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">flatten</td>
<td valign="top">ignore directory structure of source directory,
copy all files into a single directory, specified by the <var>todir</var>
attribute (default is "false").</td>
<td valign="top" align="center">No</td>
</tr>
</table>
<h3>Examples</h3>
<p><b>Move a single file (rename a file)</b></p>
<pre>
<move file="file.orig" tofile="file.moved" />
</pre>
<p><b>Move a single file to a directory</b></p>
<pre>
<move file="file.orig" todir="dir/to/move/to" />
</pre>
<p><b>Move a directory to a new directory</b></p>
<pre>
<move dir="src/dir" todir="new/dir/to/move/to" />
</pre>
<p>Note that the directory src/dir will be removed.</p>
<p><b>Move a set of files to a new directory</b></p>
<pre>
<move todir="some/new/dir" >
<fileset dir="my/src/dir" >
<include name="**/*.jar" />
<exclude name="**/ant.jar" />
</fileset>
</move>
</pre>
<hr>
<h2><a name="patch">Patch</a></h2>
<h2><a name="patch">Patch</a></h2>
<h3>Description</h3>
<h3>Description</h3>
<p>Applies a diff file to originals.
<p>Applies a diff file to originals.
@@ -3272,6 +3432,8 @@ JVM that I tested, the home directory on Windows is "C:\". Different
implementations may use other values for the home directory on Windows.
implementations may use other values for the home directory on Windows.
<hr>
<hr>
<h2><a name="rename">Rename</a></h2>
<h2><a name="rename">Rename</a></h2>
<h3><i>Deprecated</i></h3>
<p><i>This task has been deprecated. Use the Move task instead.</i></p>
<h3>Description</h3>
<h3>Description</h3>
<p>Renames a given file.</p>
<p>Renames a given file.</p>
<h3>Parameters</h3>
<h3>Parameters</h3>