|
@@ -10,13 +10,13 @@ |
|
|
<body> |
|
|
<body> |
|
|
|
|
|
|
|
|
<h1>Ant User Manual</h1> |
|
|
<h1>Ant User Manual</h1> |
|
|
<p>by </p> |
|
|
|
|
|
|
|
|
<p>by</p> |
|
|
<ul> |
|
|
<ul> |
|
|
<li>James Duncan Davison <a href="mailto:(duncan@x180.com">(duncan@x180.com</a>)</li> |
|
|
|
|
|
<li>Arnout J. Kuiper <a href="mailto:(ajkuiper@wxs.nl">(ajkuiper@wxs.nl</a>)</li> |
|
|
|
|
|
<li>Stefano Mazzocchi <a href="mailto:(stefano@apache.org">(stefano@apache.org</a>)</li> |
|
|
|
|
|
|
|
|
<li>Arnout J. Kuiper (<a href="mailto:(ajkuiper@wxs.nl">ajkuiper@wxs.nl</a>)</li> |
|
|
|
|
|
<li>James Duncan Davison (<a href="mailto:(duncan@x180.com">duncan@x180.com</a>)</li> |
|
|
|
|
|
<li>Stefano Mazzocchi (<a href="mailto:(stefano@apache.org">stefano@apache.org</a>)</li> |
|
|
</ul> |
|
|
</ul> |
|
|
<p>Version 1.0.2 - 2000/01/26</p> |
|
|
|
|
|
|
|
|
<p>Version 1.0.3 - 2000/02/06</p> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2>Table of Contents</h2> |
|
|
<h2>Table of Contents</h2> |
|
|
<ul> |
|
|
<ul> |
|
@@ -26,6 +26,7 @@ |
|
|
<li><a href="#installing">Installing Ant</a></li> |
|
|
<li><a href="#installing">Installing Ant</a></li> |
|
|
<li><a href="#running">Running Ant</a></li> |
|
|
<li><a href="#running">Running Ant</a></li> |
|
|
<li><a href="#buildfile">Writing a simple buildfile</a> |
|
|
<li><a href="#buildfile">Writing a simple buildfile</a> |
|
|
|
|
|
<li><a href="#directorybasedtasks">Directory based tasks</a></li> |
|
|
<li><a href="#tasks">Built in Tasks</a> |
|
|
<li><a href="#tasks">Built in Tasks</a> |
|
|
<li><a href="#writingowntask">Writing your own task</a></li> |
|
|
<li><a href="#writingowntask">Writing your own task</a></li> |
|
|
<li><a href="#license">License</a></li> |
|
|
<li><a href="#license">License</a></li> |
|
@@ -82,11 +83,11 @@ build Ant from the source code.</p> |
|
|
to build a bootstrap version of Ant.</p> |
|
|
to build a bootstrap version of Ant.</p> |
|
|
<p>When finished, use</p> |
|
|
<p>When finished, use</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code>build.bat -Ddist.dir=<directory to install Ant> dist</code></p> |
|
|
|
|
|
|
|
|
<p><code>build.bat -Ddist.dir=<directory to install Ant> dist</code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>for Windows, and</p> |
|
|
<p>for Windows, and</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code>build.sh -Ddist.dir=<directory to install Ant> dist</code></p> |
|
|
|
|
|
|
|
|
<p><code>build.sh -Ddist.dir=<directory to install Ant> dist</code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>for UNIX, to create a binary distribution of Ant. This distribution can be |
|
|
<p>for UNIX, to create a binary distribution of Ant. This distribution can be |
|
|
found in the directory you specified.</p> |
|
|
found in the directory you specified.</p> |
|
@@ -156,22 +157,22 @@ Options: |
|
|
-D<property>=<value> use value for given property</pre> |
|
|
-D<property>=<value> use value for given property</pre> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre>ant</pre> |
|
|
|
|
|
|
|
|
<pre>ant</pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>runs Ant using the <code>build.xml</code> file in the current directory, on |
|
|
<p>runs Ant using the <code>build.xml</code> file in the current directory, on |
|
|
the default target.</p> |
|
|
the default target.</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre>ant -buildfile test.xml</pre> |
|
|
|
|
|
|
|
|
<pre>ant -buildfile test.xml</pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>runs Ant using the <code>test.xml</code> file in the current directory, on |
|
|
<p>runs Ant using the <code>test.xml</code> file in the current directory, on |
|
|
the default target.</p> |
|
|
the default target.</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre>ant -buildfile test.xml dist</pre> |
|
|
|
|
|
|
|
|
<pre>ant -buildfile test.xml dist</pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>runs Ant using the <code>test.xml</code> file in the current directory, on a |
|
|
<p>runs Ant using the <code>test.xml</code> file in the current directory, on a |
|
|
target called <code>dist</code>.</p> |
|
|
target called <code>dist</code>.</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre> |
|
|
|
|
|
|
|
|
<pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>runs Ant using the <code>test.xml</code> file in the current directory, on a |
|
|
<p>runs Ant using the <code>test.xml</code> file in the current directory, on a |
|
|
target called <code>dist</code>. It also sets the <i>build</i> property to the |
|
|
target called <code>dist</code>. It also sets the <i>build</i> property to the |
|
@@ -180,7 +181,7 @@ value <i>build/classes</i>.</p> |
|
|
<p>When you have installed Ant in the do-it-yourself way, Ant can be started |
|
|
<p>When you have installed Ant in the do-it-yourself way, Ant can be started |
|
|
with:</p> |
|
|
with:</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre>set CLASSPATH=c:\ant\lib\ant.jar;c:\ant\lib\xml.jar;c:\jdk1.2.2\lib\tools.jar |
|
|
|
|
|
|
|
|
<pre>set CLASSPATH=c:\ant\lib\ant.jar;c:\ant\lib\xml.jar;c:\jdk1.2.2\lib\tools.jar |
|
|
java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre> |
|
|
java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>These instructions actually do exactly the same as the <code>ant</code> |
|
|
<p>These instructions actually do exactly the same as the <code>ant</code> |
|
@@ -264,7 +265,7 @@ of an attribute might contain references to a property. These references will be |
|
|
resolved before the task is executed.</p> |
|
|
resolved before the task is executed.</p> |
|
|
<p>Tasks have a common structure:</p> |
|
|
<p>Tasks have a common structure:</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre><name attribute1="value1" attribute2="value2" ... /></pre> |
|
|
|
|
|
|
|
|
<pre><name attribute1="value1" attribute2="value2" ... /></pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>where name is the name of the task, attribute-x the attribute name, and |
|
|
<p>where name is the name of the task, attribute-x the attribute name, and |
|
|
value-x the value of this attribute.</p> |
|
|
value-x the value of this attribute.</p> |
|
@@ -281,7 +282,7 @@ task attributes. This is done by placing the property name between |
|
|
This is resolved as "build/classes".</p> |
|
|
This is resolved as "build/classes".</p> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre><project name="foo" default="dist" basedir="."> |
|
|
|
|
|
|
|
|
<pre><project name="foo" default="dist" basedir="."> |
|
|
<target name="init"> |
|
|
<target name="init"> |
|
|
<tstamp/> |
|
|
<tstamp/> |
|
|
<property name="build" value="build" /> |
|
|
<property name="build" value="build" /> |
|
@@ -310,6 +311,95 @@ This is resolved as "build/classes".</p> |
|
|
</pre> |
|
|
</pre> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
|
|
|
<h2><a name="directorybasedtasks">Directory based tasks</a></h2> |
|
|
|
|
|
<p>Some tasks use directory trees for the task they perform. For instance, the <a |
|
|
|
|
|
href="#javac">Javac task</a> which works upon a directory tree with .java files. |
|
|
|
|
|
Sometimes it can be very useful to work on a subset of that directory tree. This |
|
|
|
|
|
section describes how you can select a subset of such a directory tree.</p> |
|
|
|
|
|
<p>Ant gives you two ways to create a subset, which both can be used at the same |
|
|
|
|
|
time:</p> |
|
|
|
|
|
<ul> |
|
|
|
|
|
<li>Only include files/directories that match at least one pattern of a set of |
|
|
|
|
|
patterns</li> |
|
|
|
|
|
<li>Exclude files/directories that match at least one pattern a set of |
|
|
|
|
|
patterns</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
<p>When both inclusion and exclusion are used, only files/directories that match |
|
|
|
|
|
the include patterns, and don't match the exclude patterns are used.</p> |
|
|
|
|
|
<h3>Patterns</h3> |
|
|
|
|
|
<p>As described earlier, patterns are used for the inclusion and exclusion. |
|
|
|
|
|
These patterns look very much like the patterns used in DOS and UNIX:</p> |
|
|
|
|
|
<p>'*' matches zero or more characters, '?' matches one character.</p> |
|
|
|
|
|
<p>Examples:</p> |
|
|
|
|
|
<p>'*.java' matches '.java', 'x.java' and 'FooBar.java', but not 'FooBar.xml' |
|
|
|
|
|
(does not end with '.java').</p> |
|
|
|
|
|
<p>'?.java' matches 'x.java', 'A.java', but not '.java' or 'xyz.java' (both |
|
|
|
|
|
don't have one character before '.java').</p> |
|
|
|
|
|
<p>Combinations of '*'s and '?'s are allowed.</p> |
|
|
|
|
|
<p>Matching is done per-directory. This means that first the first directory in |
|
|
|
|
|
the pattern is matched against the first directory in the path to match. Then |
|
|
|
|
|
the second directories are matched, and so on. E.g. when we have the pattern '/?abc/*/*.java' |
|
|
|
|
|
and the path '/xabc/foobar/test.java', then first '?abc' is matched with 'xabc', |
|
|
|
|
|
then '*' is matched with 'foobar' and finally '*.java' is matched with 'test.java'. |
|
|
|
|
|
They all match so the path matches the pattern.</p> |
|
|
|
|
|
<p>Too make things a bit more flexible, we add one extra feature, which makes it |
|
|
|
|
|
possible to match multiple directory levels. This can be used to match a |
|
|
|
|
|
complete directory tree, or a file anywhere in the directory tree. To do this, '**' |
|
|
|
|
|
must be used as the name of a directory. When '**' is used as the name of a |
|
|
|
|
|
directory in the pattern, it matches zero or more directories. For instance: |
|
|
|
|
|
'/test/**' matches all files/directories under '/test/', such as '/test/x.java', |
|
|
|
|
|
or '/test/foo/bar/xyz.html', but not '/xyz.xml'.</p> |
|
|
|
|
|
<p>There is one "shorthand", if a pattern ends with '/' or '\', then '**' |
|
|
|
|
|
is appended. E.g. "mypackage/test/" is interpreted as were it "mypackage/test/**".</p> |
|
|
|
|
|
<p>Examples:</p> |
|
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">**/CVS/*</td> |
|
|
|
|
|
<td valign="top">Matches all files in CVS directories, that can be located |
|
|
|
|
|
anywhere in the directory tree. |
|
|
|
|
|
<p>Matches:</p> |
|
|
|
|
|
<p>CVS/Repository<br> |
|
|
|
|
|
org/apache/CVS/Entries<br> |
|
|
|
|
|
org/apache/jakarta/tools/ant/CVS/Entries</p> |
|
|
|
|
|
<p>But not:</p> |
|
|
|
|
|
<p>org/apache/CVS/foo/bar/Entries ('foo/bar/' part does not match)</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">org/apache/jakarta/**</td> |
|
|
|
|
|
<td valign="top">Matches all files in the org/apache/jakarta directory tree. |
|
|
|
|
|
<p>Matches:</p> |
|
|
|
|
|
<p>org/apache/jakarta/tools/ant/docs/index.html<br> |
|
|
|
|
|
org/apache/jakarta/test.xml</p> |
|
|
|
|
|
<p>But not:</p> |
|
|
|
|
|
<p>org/apache/xyz.java ('jakarta'/' part is missing)</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">org/apache/**/CVS/*</td> |
|
|
|
|
|
<td valign="top">Matches all files in CVS directories, that are located |
|
|
|
|
|
anywhere in the directory tree under org/apache. |
|
|
|
|
|
<p>Matches:</p> |
|
|
|
|
|
<p>org/apache/CVS/Entries<br> |
|
|
|
|
|
org/apache/jakarta/tools/ant/CVS/Entries</p> |
|
|
|
|
|
<p>But not:</p> |
|
|
|
|
|
<p>org/apache/CVS/foo/bar/Entries ('foo/bar/' part does not match)</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">**/test/**</td> |
|
|
|
|
|
<td valign="top">Matches all files which have a directory 'test' in their |
|
|
|
|
|
path, including 'test' as a filename.</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</table> |
|
|
|
|
|
<p>When these patterns are used in inclusion and exclusion, you have a powerful |
|
|
|
|
|
way to select just the files you want.</p> |
|
|
|
|
|
<h3>Examples</h3> |
|
|
|
|
|
<pre> <copydir srcdir="${src}" |
|
|
|
|
|
destdir="${dist}" |
|
|
|
|
|
includes="**/images/*" |
|
|
|
|
|
excludes="**/*.gif" /></pre> |
|
|
|
|
|
<p>This copies all files in directories called "images", that are |
|
|
|
|
|
located in the directory tree "${src}" to the destination "${dist}", |
|
|
|
|
|
but excludes all "*.gif" files from the copy.</p> |
|
|
|
|
|
<hr> |
|
|
<h2><a name="tasks">Built in tasks</a></h2> |
|
|
<h2><a name="tasks">Built in tasks</a></h2> |
|
|
<ul> |
|
|
<ul> |
|
|
<li><a href="#ant">Ant</a></li> |
|
|
<li><a href="#ant">Ant</a></li> |
|
@@ -373,9 +463,9 @@ These properties will override the properties that are set in the new project. |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><ant antfile="subproject/subbuild.xml" dir="subproject" |
|
|
|
|
|
target="compile" /></code></p> |
|
|
|
|
|
<p><code><ant dir="subproject" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><ant antfile="subproject/subbuild.xml" dir="subproject" |
|
|
|
|
|
target="compile" /></code></p> |
|
|
|
|
|
<p><code><ant dir="subproject" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="chmod">Chmod</a></h2> |
|
|
<h2><a name="chmod">Chmod</a></h2> |
|
@@ -402,8 +492,8 @@ The permissions are also UNIX style, like the argument for the chmod command.</p |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><chmod src="${dist}/start.sh" perm="ugo+rx" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
|
|
|
<p><code><chmod src="${dist}/start.sh" perm="ugo+rx" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>makes the "start.sh" file readable and executable for anyone on a |
|
|
<p>makes the "start.sh" file readable and executable for anyone on a |
|
|
UNIX system.</p> |
|
|
UNIX system.</p> |
|
@@ -411,11 +501,20 @@ UNIX system.</p> |
|
|
<h2><a name="copydir">Copydir</a></h2> |
|
|
<h2><a name="copydir">Copydir</a></h2> |
|
|
<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 exclude a set of files from the files that are being |
|
|
|
|
|
copied. This can be done with the <i>ignore</i> attribute. This attribute |
|
|
|
|
|
contains the names of the files/directories that must be excluded from the copy. |
|
|
|
|
|
The names specified in the <i>ignore</i> attribute are just names, they do not |
|
|
|
|
|
contain any path information!</p> |
|
|
|
|
|
|
|
|
<p>It is possible to refine the set of files that are being copied. This can be |
|
|
|
|
|
done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> |
|
|
|
|
|
attributes. With the <i>includes</i> attribute you specify the files you want to |
|
|
|
|
|
have included by using patterns. The <i>exclude</i> attribute is used to specify |
|
|
|
|
|
the files you want to have excluded. 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. The patterns are |
|
|
|
|
|
relative to the <i>src</i> directory.</p> |
|
|
|
|
|
<p>The <i>ignore</i> attribute contains the names of the files/directories that |
|
|
|
|
|
must be excluded from the copy. The names specified in the <i>ignore</i> |
|
|
|
|
|
attribute are just names, they do not contain any path information! Note that |
|
|
|
|
|
this attribute has been replaced by the <i>excludes</i> attribute.</p> |
|
|
<h3>Parameters</h3> |
|
|
<h3>Parameters</h3> |
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
<tr> |
|
|
<tr> |
|
@@ -435,24 +534,49 @@ contain any path information!</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">ignore</td> |
|
|
<td valign="top">ignore</td> |
|
|
<td valign="top">comma separated list of filenames/directorynames to ignore.</td> |
|
|
|
|
|
|
|
|
<td valign="top">comma separated list of filenames/directorynames to ignore. |
|
|
|
|
|
No files (except default excludes) are excluded when omitted. (<b>deprecated</b>, |
|
|
|
|
|
use <i>excludes</i> instead).</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">includes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
included. All files are included when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">excludes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
excluded. No files (except default excludes) are excluded when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">defaultexcludes</td> |
|
|
|
|
|
<td valign="top">indicates whether default excludes should be used or not |
|
|
|
|
|
("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> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><copydir src="${src}/resources" dest="${dist}" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<pre> <copydir src="${src}/resources" |
|
|
|
|
|
dest="${dist}" |
|
|
|
|
|
/></pre> |
|
|
<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>.</p> |
|
|
<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>.</p> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><copydir src="${src}/resources" dest="${dist}" |
|
|
|
|
|
ignore="old, Test.java" /></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>. |
|
|
|
|
|
All files/directories with the names <code>old</code> and <code>Test.java</code> |
|
|
|
|
|
are excluded from the copy. When <code>old</code> or <code>Test.java</code> is |
|
|
|
|
|
the name of a directory, then that whole directory is excluded from the copy.</p> |
|
|
|
|
|
|
|
|
<pre> <copydir src="${src}/resources" |
|
|
|
|
|
dest="${dist}" |
|
|
|
|
|
includes="**/*.java" |
|
|
|
|
|
excludes="**/Test.java" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code> |
|
|
|
|
|
recursively. All java files are copied, except for files with the name <code>Test.java</code>.</p> |
|
|
|
|
|
<pre> <copydir src="${src}/resources" |
|
|
|
|
|
dest="${dist}" |
|
|
|
|
|
includes="**/*.java" |
|
|
|
|
|
excludes="mypackage/test/**" /></pre> |
|
|
|
|
|
<p>copies the directory <code>${src}/resources</code> to <code>${dist}</code> |
|
|
|
|
|
recursively. All java files are copied, except for the files under the <code>mypackage/test</code> |
|
|
|
|
|
directory.</p> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="copyfile">Copyfile</a></h2> |
|
|
<h2><a name="copyfile">Copyfile</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
@@ -479,10 +603,10 @@ does not exist.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><copyfile src="test.java" dest="subdir/test.java" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
<p><code><copyfile src="${src}/index.html" dest="${dist}/help/index.html" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
|
|
|
<p><code><copyfile src="test.java" dest="subdir/test.java" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
<p><code><copyfile src="${src}/index.html" dest="${dist}/help/index.html" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="cvs">Cvs</a></h2> |
|
|
<h2><a name="cvs">Cvs</a></h2> |
|
@@ -521,8 +645,8 @@ preferred, because of speed.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><cvs cvsRoot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic" |
|
|
|
|
|
package="jakarta-tools" dest="${ws.dir}" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><cvs cvsRoot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic" |
|
|
|
|
|
package="jakarta-tools" dest="${ws.dir}" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<p>This checks out the package/module "jakarta-tools" from the CVS |
|
|
<p>This checks out the package/module "jakarta-tools" from the CVS |
|
|
repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".</p> |
|
|
repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".</p> |
|
@@ -545,8 +669,8 @@ repository pointed to by the cvsRoot attribute, and stores the files in "${ |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><delete file="/lib/ant.jar" /></code></p> |
|
|
|
|
|
<p><code><delete file="${ant}" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><delete file="/lib/ant.jar" /></code></p> |
|
|
|
|
|
<p><code><delete file="${ant}" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="deltree">Deltree</a></h2> |
|
|
<h2><a name="deltree">Deltree</a></h2> |
|
@@ -567,8 +691,8 @@ repository pointed to by the cvsRoot attribute, and stores the files in "${ |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><deltree dir="dist" /></code></p> |
|
|
|
|
|
<p><code><deltree dir="${dist}" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><deltree dir="dist" /></code></p> |
|
|
|
|
|
<p><code><deltree dir="${dist}" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="echo">Echo</a></h2> |
|
|
<h2><a name="echo">Echo</a></h2> |
|
@@ -589,7 +713,7 @@ repository pointed to by the cvsRoot attribute, and stores the files in "${ |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><echo message="Hello world" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><echo message="Hello world" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="exec">Exec</a></h2> |
|
|
<h2><a name="exec">Exec</a></h2> |
|
@@ -629,8 +753,8 @@ systems.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><exec dir="${src}" command="dir" os="windows" |
|
|
|
|
|
output="dir.txt" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><exec dir="${src}" command="dir" os="windows" |
|
|
|
|
|
output="dir.txt" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="expand">Expand</a></h2> |
|
|
<h2><a name="expand">Expand</a></h2> |
|
@@ -656,8 +780,8 @@ output="dir.txt" /></code></p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><expand src="${tomcat_src}/tools-src.zip" dest="${tools.home}" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
|
|
|
<p><code><expand src="${tomcat_src}/tools-src.zip" dest="${tools.home}" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="get">Get</a></h2> |
|
|
<h2><a name="get">Get</a></h2> |
|
@@ -692,8 +816,8 @@ archive with http/ftp.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><get src="http://jakarta.apache.org/" dest="help/index.html" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
|
|
|
<p><code><get src="http://jakarta.apache.org/" dest="help/index.html" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="gzip">GZip</a></h2> |
|
|
<h2><a name="gzip">GZip</a></h2> |
|
@@ -719,15 +843,29 @@ archive with http/ftp.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><gzip src="test.tar" zipfile="test.tar.gz" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><gzip src="test.tar" zipfile="test.tar.gz" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="jar">Jar</a></h2> |
|
|
<h2><a name="jar">Jar</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
|
<p>Jars a set of files.</p> |
|
|
<p>Jars a set of files.</p> |
|
|
<p>The <i>basedir</i> attribute is the reference directory from where to jar.</p> |
|
|
<p>The <i>basedir</i> attribute is the reference directory from where to jar.</p> |
|
|
<p>When "*" is used for items, all files in the basedir, and its |
|
|
|
|
|
subdirectories, will be jarred. Otherwise all the files and directories |
|
|
|
|
|
|
|
|
<p>It is possible to refine the set of files that are being jarred. This can be |
|
|
|
|
|
done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> |
|
|
|
|
|
attributes. With the <i>includes</i> attribute you specify the files you want to |
|
|
|
|
|
have included by using patterns. The <i>exclude</i> attribute is used to specify |
|
|
|
|
|
the files you want to have excluded. 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. The patterns are |
|
|
|
|
|
relative to the <i>basedir</i> directory.</p> |
|
|
|
|
|
<p>The <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> attributes |
|
|
|
|
|
replace the <i>items</i> and <i>ignore</i> attributes. The following explains |
|
|
|
|
|
how the deprecated <i>items</i> and <i>ignore</i> attribute behave.</p> |
|
|
|
|
|
<p>When "*" is used for <i>items</i>, all files in the basedir, and |
|
|
|
|
|
its subdirectories, will be jarred. Otherwise all the files and directories |
|
|
mentioned in the items list will jarred. When a directory is specified, then all |
|
|
mentioned in the items list will jarred. When a directory is specified, then all |
|
|
files within it are also jarred.</p> |
|
|
files within it are also jarred.</p> |
|
|
<p>With the <i>ignore</i> attribute, you can specify files or directories to |
|
|
<p>With the <i>ignore</i> attribute, you can specify files or directories to |
|
@@ -753,13 +891,34 @@ attribute are just names, they do not contain any path information!</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">items</td> |
|
|
<td valign="top">items</td> |
|
|
<td valign="top">a comma separated list of the files/directories to jar.</td> |
|
|
|
|
|
<td valign="top" align="center">Yes</td> |
|
|
|
|
|
|
|
|
<td valign="top">a comma separated list of the files/directories to jar. All |
|
|
|
|
|
files are included when omitted. (<b>deprecated</b>, use <i>includes</i> |
|
|
|
|
|
instead).</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">ignore</td> |
|
|
<td valign="top">ignore</td> |
|
|
<td valign="top">a comma separated list of the filenames/directorynames to |
|
|
|
|
|
exclude from the jar.</td> |
|
|
|
|
|
|
|
|
<td valign="top">comma separated list of filenames/directorynames to exclude |
|
|
|
|
|
from the jar. No files (except default excludes) are excluded when |
|
|
|
|
|
omitted. (<b>deprecated</b>, use <i>excludes</i> instead).</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">includes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
included. All files are included when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">excludes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
excluded. No files (except default excludes) are excluded when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">defaultexcludes</td> |
|
|
|
|
|
<td valign="top">indicates whether default excludes should be used or not |
|
|
|
|
|
("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> |
|
|
<tr> |
|
@@ -769,16 +928,30 @@ attribute are just names, they do not contain any path information!</p> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><jar jarfile="${dist}/lib/app.jar" basedir="${build}/classes" |
|
|
|
|
|
items="*" /></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<pre> <jar jarfile="${dist}/lib/app.jar" basedir="${build}/classes" /></pre> |
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p> |
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><jar jarfile="${dist}/lib/app.jar" basedir="${build}/classes" |
|
|
|
|
|
items="*" ignore="Test.class" /></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<pre> <jar jarfile="${dist}/lib/app.jar" |
|
|
|
|
|
basedir="${build}/classes" |
|
|
|
|
|
excludes="**/Test.class" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
|
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files |
|
|
|
|
|
with the name <code>Test.class</code> are excluded.</p> |
|
|
|
|
|
<pre> <jar jarfile="${dist}/lib/app.jar" |
|
|
|
|
|
basedir="${build}/classes" |
|
|
|
|
|
includes="mypackage/test/**" |
|
|
|
|
|
excludes="**/Test.class" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
|
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only |
|
|
|
|
|
files under the directory <code>mypackage/test</code> are used, and files with |
|
|
|
|
|
the name <code>Test.class</code> are excluded.</p> |
|
|
|
|
|
<h3>Deprecated examples</h3> |
|
|
|
|
|
<pre> <jar jarfile="${dist}/lib/app.jar" basedir="${build}/classes" items="*" /></pre> |
|
|
|
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
|
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p> |
|
|
|
|
|
<pre> <jar jarfile="${dist}/lib/app.jar" basedir="${build}/classes" items="*" ignore="Test.class" /></pre> |
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
<p>jars all files in the <code>${build}/classes</code> directory in a file |
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. |
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. |
|
|
Files/directories with the name <code>Test.class</code> are excluded.</p> |
|
|
Files/directories with the name <code>Test.class</code> are excluded.</p> |
|
@@ -823,11 +996,11 @@ the one that is currently running Ant.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><java class="test.Main" /></code></p> |
|
|
|
|
|
<p><code><java class="test.Main" args="-h" /></code></p> |
|
|
|
|
|
<p><code><java class="test.Main" args="-h" |
|
|
|
|
|
fork="yes" jvmargs="-Xrunhprof:cpu=samples,file=log.txt,depth=3" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
|
|
|
<p><code><java class="test.Main" /></code></p> |
|
|
|
|
|
<p><code><java class="test.Main" args="-h" /></code></p> |
|
|
|
|
|
<p><code><java class="test.Main" args="-h" |
|
|
|
|
|
fork="yes" jvmargs="-Xrunhprof:cpu=samples,file=log.txt,depth=3" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="javac">Javac</a></h2> |
|
|
<h2><a name="javac">Javac</a></h2> |
|
@@ -841,6 +1014,16 @@ destination directory, allowing support files to be located properly in the |
|
|
classpath.</p> |
|
|
classpath.</p> |
|
|
<p>The directory structure of the source tree should follow the package |
|
|
<p>The directory structure of the source tree should follow the package |
|
|
hierarchy.</p> |
|
|
hierarchy.</p> |
|
|
|
|
|
<p>It is possible to refine the set of files that are being compiled/copied. |
|
|
|
|
|
This can be done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> |
|
|
|
|
|
attributes. With the <i>includes</i> attribute you specify the files you want to |
|
|
|
|
|
have included by using patterns. The <i>exclude</i> attribute is used to specify |
|
|
|
|
|
the files you want to have excluded. 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. The patterns are |
|
|
|
|
|
relative to the <i>srcdir</i> directory.</p> |
|
|
<p>It is possible to use different compilers. This can be selected with the |
|
|
<p>It is possible to use different compilers. This can be selected with the |
|
|
"build.compiler" property. There are three choices:</p> |
|
|
"build.compiler" property. There are three choices:</p> |
|
|
<ul> |
|
|
<ul> |
|
@@ -868,6 +1051,24 @@ hierarchy.</p> |
|
|
<td valign="top">location where to store the class files.</td> |
|
|
<td valign="top">location where to store the class files.</td> |
|
|
<td align="center" valign="top">Yes</td> |
|
|
<td align="center" valign="top">Yes</td> |
|
|
</tr> |
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">includes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
included. All files are included when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">excludes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
excluded. No files (except default excludes) are excluded when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">defaultexcludes</td> |
|
|
|
|
|
<td valign="top">indicates whether default excludes should be used or not |
|
|
|
|
|
("yes"/"no"). Default excludes are used when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">classpath</td> |
|
|
<td valign="top">classpath</td> |
|
|
<td valign="top">the classpath to use.</td> |
|
|
<td valign="top">the classpath to use.</td> |
|
@@ -903,20 +1104,39 @@ hierarchy.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><javac srcdir="${src}" destdir="${build}" -classpath="xyz.jar" |
|
|
|
|
|
-debug="on" /></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<pre> <javac srcdir="${src}" |
|
|
|
|
|
destdir="${build}" |
|
|
|
|
|
classpath="xyz.jar" |
|
|
|
|
|
debug="on" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>compiles all .java files under the directory <code>${src}</code>, and stores |
|
|
|
|
|
the .class files in the directory <code>${build}</code>. It also copies the non-java |
|
|
|
|
|
files from the tree under <code>${src}</code> to the tree under <code>${build}</code>. |
|
|
|
|
|
The classpath used contains <code>xyz.jar</code>, and debug information is on.</p> |
|
|
|
|
|
<pre> <javac srcdir="${src}" |
|
|
|
|
|
destdir="${build}" |
|
|
|
|
|
includes="mypackage/p1/**,mypackage/p2/**" |
|
|
|
|
|
excludes="mypackage/p1/testpackage/**" |
|
|
|
|
|
classpath="xyz.jar" |
|
|
|
|
|
debug="on" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>compiles .java files under the directory <code>${src}</code>, and stores the |
|
|
|
|
|
.class files in the directory <code>${build}</code>. It also copies the non-java |
|
|
|
|
|
files from the tree under <code>${src}</code> to the tree under <code>${build}</code>. |
|
|
|
|
|
The classpath used contains <code>xyz.jar</code>, and debug information is on. |
|
|
|
|
|
Only files under <code>mypackage/p1</code> and <code>mypackage/p2</code> are |
|
|
|
|
|
used. Files in the <code>mypackage/p1/testpackage</code> directory are excluded |
|
|
|
|
|
form compilation and copy.</p> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="javadoc">Javadoc/Javadoc2</a></h2> |
|
|
<h2><a name="javadoc">Javadoc/Javadoc2</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
|
<p>Generates code documentation using the javadoc tool.</p> |
|
|
<p>Generates code documentation using the javadoc tool.</p> |
|
|
<p>The source directory will be recursively scanned for Java |
|
|
|
|
|
source files to but only those matching the inclusion rules will be passed to |
|
|
|
|
|
the javadoc tool. This allows wildcards to be used to choose between package |
|
|
|
|
|
names, reducing verbosity and management costs over time. This task, however, |
|
|
|
|
|
has no notion of "changed" files, unlike the <a href="#javac">javac</a> |
|
|
|
|
|
task, but it's not used so frequently.</p> |
|
|
|
|
|
|
|
|
<p>The source directory will be recursively scanned for Java source files to but |
|
|
|
|
|
only those matching the inclusion rules will be passed to the javadoc tool. This |
|
|
|
|
|
allows wildcards to be used to choose between package names, reducing verbosity |
|
|
|
|
|
and management costs over time. This task, however, has no notion of |
|
|
|
|
|
"changed" files, unlike the <a href="#javac">javac</a> task, but it's |
|
|
|
|
|
not used so frequently.</p> |
|
|
<p>This task works seamlessly between different javadoc versions (1.1 and 1.2), |
|
|
<p>This task works seamlessly between different javadoc versions (1.1 and 1.2), |
|
|
with the obvious restriction that the 1.2 attributes will be ignored if run in a |
|
|
with the obvious restriction that the 1.2 attributes will be ignored if run in a |
|
|
1.1 VM.</p> |
|
|
1.1 VM.</p> |
|
@@ -968,7 +1188,8 @@ instead.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">Bootclasspath</td> |
|
|
<td valign="top">Bootclasspath</td> |
|
|
<td valign="top">Override location of class files loaded by the bootstrap class loader</td> |
|
|
|
|
|
|
|
|
<td valign="top">Override location of class files loaded by the bootstrap |
|
|
|
|
|
class loader</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
@@ -1052,7 +1273,7 @@ instead.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">Splitindex</td> |
|
|
<td valign="top">Splitindex</td> |
|
|
<td valign="top"> Split index into one file per letter</td> |
|
|
|
|
|
|
|
|
<td valign="top">Split index into one file per letter</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
@@ -1064,87 +1285,86 @@ instead.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">Doctitle</td> |
|
|
<td valign="top">Doctitle</td> |
|
|
<td valign="top"> Include title for the package index(first) page |
|
|
|
|
|
(html-code)</td> |
|
|
|
|
|
|
|
|
<td valign="top">Include title for the package index(first) page (html-code)</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">Header</td> |
|
|
<td valign="top">Header</td> |
|
|
<td valign="top"> Include header text for each page (html-code)</td> |
|
|
|
|
|
|
|
|
<td valign="top">Include header text for each page (html-code)</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">Footer</td> |
|
|
<td valign="top">Footer</td> |
|
|
<td valign="top"> Include footer text for each page (html-code)</td> |
|
|
|
|
|
|
|
|
<td valign="top">Include footer text for each page (html-code)</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">bottom</td> |
|
|
<td valign="top">bottom</td> |
|
|
<td valign="top"> Include bottom text for each page (html-code)</td> |
|
|
|
|
|
|
|
|
<td valign="top">Include bottom text for each page (html-code)</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">link</td> |
|
|
<td valign="top">link</td> |
|
|
<td valign="top"> Create links to javadoc output at the given |
|
|
|
|
|
URL</td> |
|
|
|
|
|
|
|
|
<td valign="top">Create links to javadoc output at the given URL</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">linkoffline</td> |
|
|
<td valign="top">linkoffline</td> |
|
|
<td valign="top"> Link to docs at <url> using package list at <url2></td> |
|
|
|
|
|
|
|
|
<td valign="top">Link to docs at <url> using package list at |
|
|
|
|
|
<url2></td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">group</td> |
|
|
<td valign="top">group</td> |
|
|
<td valign="top"> Group specified packages together in overview page</td> |
|
|
|
|
|
|
|
|
<td valign="top">Group specified packages together in overview page</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">nodeprecated</td> |
|
|
<td valign="top">nodeprecated</td> |
|
|
<td valign="top"> Do not include @deprecated information</td> |
|
|
|
|
|
|
|
|
<td valign="top">Do not include @deprecated information</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">nodeprecatedlist</td> |
|
|
<td valign="top">nodeprecatedlist</td> |
|
|
<td valign="top"> Do not generate deprecated list</td> |
|
|
|
|
|
|
|
|
<td valign="top">Do not generate deprecated list</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">notree</td> |
|
|
<td valign="top">notree</td> |
|
|
<td valign="top"> Do not generate class hierarchy</td> |
|
|
|
|
|
|
|
|
<td valign="top">Do not generate class hierarchy</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">noindex</td> |
|
|
<td valign="top">noindex</td> |
|
|
<td valign="top"> Do not generate index</td> |
|
|
|
|
|
|
|
|
<td valign="top">Do not generate index</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">nohelp</td> |
|
|
<td valign="top">nohelp</td> |
|
|
<td valign="top"> Do not generate help link</td> |
|
|
|
|
|
|
|
|
<td valign="top">Do not generate help link</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">nonavbar</td> |
|
|
<td valign="top">nonavbar</td> |
|
|
<td valign="top"> Do not generate navigation bar</td> |
|
|
|
|
|
|
|
|
<td valign="top">Do not generate navigation bar</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">serialwarn</td> |
|
|
<td valign="top">serialwarn</td> |
|
|
<td valign="top"> Generate warning about @serial tag</td> |
|
|
|
|
|
|
|
|
<td valign="top">Generate warning about @serial tag</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
@@ -1162,7 +1382,8 @@ instead.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">charset</td> |
|
|
<td valign="top">charset</td> |
|
|
<td valign="top"> Charset for cross-platform viewing of generated documentation</td> |
|
|
|
|
|
|
|
|
<td valign="top">Charset for cross-platform viewing of generated |
|
|
|
|
|
documentation</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">1.2</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
<td align="center" valign="top">no</td> |
|
|
</tr> |
|
|
</tr> |
|
@@ -1175,7 +1396,7 @@ instead.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre><javadoc packagenames="com.dummy.test.*" |
|
|
|
|
|
|
|
|
<pre><javadoc packagenames="com.dummy.test.*" |
|
|
sourcepath="src" |
|
|
sourcepath="src" |
|
|
destdir="docs/api" |
|
|
destdir="docs/api" |
|
|
author="true" |
|
|
author="true" |
|
@@ -1228,8 +1449,8 @@ separator, which might we changed with the <i>sep</i> attribute.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><keysubst src="abc.txt" dest="def.txt" |
|
|
|
|
|
keys="VERSION=1.0.3*DATE=2000-01-10" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><keysubst src="abc.txt" dest="def.txt" |
|
|
|
|
|
keys="VERSION=1.0.3*DATE=2000-01-10" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="mkdir">Mkdir</a></h2> |
|
|
<h2><a name="mkdir">Mkdir</a></h2> |
|
@@ -1251,8 +1472,8 @@ necessary.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><mkdir dir="${dist}" /></code></p> |
|
|
|
|
|
<p><code><mkdir dir="${dist}/lib" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><mkdir dir="${dist}" /></code></p> |
|
|
|
|
|
<p><code><mkdir dir="${dist}/lib" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="property">Property</a></h2> |
|
|
<h2><a name="property">Property</a></h2> |
|
@@ -1310,9 +1531,9 @@ This also holds for properties loaded from a property file.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><property name="foo.dist" value="dist"/></code></p> |
|
|
|
|
|
<p><code><property file="foo.properties" /></code></p> |
|
|
|
|
|
<p><code><property resource="foo.properties" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><property name="foo.dist" value="dist"/></code></p> |
|
|
|
|
|
<p><code><property file="foo.properties" /></code></p> |
|
|
|
|
|
<p><code><property resource="foo.properties" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="replace">Replace</a></h2> |
|
|
<h2><a name="replace">Replace</a></h2> |
|
@@ -1344,8 +1565,8 @@ the <i>value</i> attribute is omitted, it defaults to "".</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><replace file="${src}/index.html" token="@@@" |
|
|
|
|
|
value="wombat" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><replace file="${src}/index.html" token="@@@" |
|
|
|
|
|
value="wombat" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="rmic">Rmic</a></h2> |
|
|
<h2><a name="rmic">Rmic</a></h2> |
|
@@ -1371,8 +1592,8 @@ value="wombat" /></code></p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><rmic class="com.xyz.FooBar" |
|
|
|
|
|
base="${build}/classes" /></code></p> |
|
|
|
|
|
|
|
|
<p><code><rmic class="com.xyz.FooBar" |
|
|
|
|
|
base="${build}/classes" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="taskdef">Taskdef</a></h2> |
|
|
<h2><a name="taskdef">Taskdef</a></h2> |
|
@@ -1403,15 +1624,15 @@ href="#writingowntask">Writing your own task</a>".</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><taskdef name="myjavadoc" value="com.mydomain.JavadocTask" |
|
|
|
|
|
/></code></p> |
|
|
|
|
|
|
|
|
<p><code><taskdef name="myjavadoc" value="com.mydomain.JavadocTask" |
|
|
|
|
|
/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="tstamp">Tstamp</a></h2> |
|
|
<h2><a name="tstamp">Tstamp</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
|
<p>Sets the DSTAMP, TSTAMP and TODAY properties in the current project. The DSTAMP is |
|
|
|
|
|
in the "yyyymmdd" format, the TSTAMP is in the "hhmm" format |
|
|
|
|
|
and TODAY is "month day year".</p> |
|
|
|
|
|
|
|
|
<p>Sets the DSTAMP, TSTAMP and TODAY properties in the current project. The |
|
|
|
|
|
DSTAMP is in the "yyyymmdd" format, the TSTAMP is in the "hhmm" |
|
|
|
|
|
format and TODAY is "month day year".</p> |
|
|
<p>These properties can be used in the buildfile, for instance, to create |
|
|
<p>These properties can be used in the buildfile, for instance, to create |
|
|
timestamped filenames or used to replace placeholder tags inside documents to |
|
|
timestamped filenames or used to replace placeholder tags inside documents to |
|
|
indicate, for example, the release date. The best place for this task is in the <a |
|
|
indicate, for example, the release date. The best place for this task is in the <a |
|
@@ -1426,22 +1647,34 @@ href="#inittarget">init target</a>.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><tstamp/></code></p> |
|
|
|
|
|
|
|
|
<p><code><tstamp/></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="zip">Zip</a></h2> |
|
|
<h2><a name="zip">Zip</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
|
<p>Creates a zipfile.</p> |
|
|
<p>Creates a zipfile.</p> |
|
|
<p>The <i>basedir</i> attribute is the reference directory from where to zip.</p> |
|
|
<p>The <i>basedir</i> attribute is the reference directory from where to zip.</p> |
|
|
<p>When "*" is used for items, all files in the basedir, and its |
|
|
|
|
|
subdirectories, will be zipped. Otherwise all the files and directories |
|
|
|
|
|
|
|
|
<p>It is possible to refine the set of files that are being zipped. This can be |
|
|
|
|
|
done with the <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> |
|
|
|
|
|
attributes. With the <i>includes</i> attribute you specify the files you want to |
|
|
|
|
|
have included by using patterns. The <i>exclude</i> attribute is used to specify |
|
|
|
|
|
the files you want to have excluded. 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. The patterns are |
|
|
|
|
|
relative to the <i>basedir</i> directory.</p> |
|
|
|
|
|
<p>The <i>includes</i>, <i>excludes</i> and <i>defaultexcludes</i> attributes |
|
|
|
|
|
replace the <i>items</i> and <i>ignore</i> attributes. The following explains |
|
|
|
|
|
how the deprecated <i>items</i> and <i>ignore</i> attribute behave.</p> |
|
|
|
|
|
<p>When "*" is used for <i>items</i>, all files in the basedir, and |
|
|
|
|
|
its subdirectories, will be zipped. Otherwise all the files and directories |
|
|
mentioned in the items list will zipped. When a directory is specified, then all |
|
|
mentioned in the items list will zipped. When a directory is specified, then all |
|
|
files within it are also zipped.</p> |
|
|
files within it are also zipped.</p> |
|
|
<p>With the <i>ignore</i> attribute, you can specify names of files or |
|
|
|
|
|
directories to ignore. These files will not be zipped. The items in the <i>ignore</i> |
|
|
|
|
|
attribute override the items in the <i>items</i> attribute. The names specified |
|
|
|
|
|
in the <i>ignore</i> attribute are just names, they do not contain any path |
|
|
|
|
|
information!</p> |
|
|
|
|
|
|
|
|
<p>With the <i>ignore</i> attribute, you can specify files or directories to |
|
|
|
|
|
ignore. These files will not be zipped. The items in the <i>ignore</i> attribute |
|
|
|
|
|
override the items in the <i>items</i> attribute. The names specified in the <i>ignore</i> |
|
|
|
|
|
attribute are just names, they do not contain any path information!</p> |
|
|
<h3>Parameters</h3> |
|
|
<h3>Parameters</h3> |
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
<tr> |
|
|
<tr> |
|
@@ -1461,27 +1694,63 @@ information!</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">items</td> |
|
|
<td valign="top">items</td> |
|
|
<td valign="top">a comma separated list of the files/directories to zip.</td> |
|
|
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
|
|
|
|
|
<td valign="top">a comma separated list of the files/directories to zip. All |
|
|
|
|
|
files are included when omitted. (<b>deprecated</b>, use <i>includes</i> |
|
|
|
|
|
instead).</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">ignore</td> |
|
|
<td valign="top">ignore</td> |
|
|
<td valign="top">a comma separated list of the filenames/directorynames to |
|
|
|
|
|
exclude from the zip.</td> |
|
|
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
|
|
|
|
|
<td valign="top">comma separated list of filenames/directorynames to exclude |
|
|
|
|
|
from the zip. No files (except default excludes) are excluded when |
|
|
|
|
|
omitted. (<b>deprecated</b>, use <i>excludes</i> instead).</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">includes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
included. All files are included when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">excludes</td> |
|
|
|
|
|
<td valign="top">comma separated list of patterns of files that must be |
|
|
|
|
|
excluded. No files (except default excludes) are excluded when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">defaultexcludes</td> |
|
|
|
|
|
<td valign="top">indicates whether default excludes should be used or not |
|
|
|
|
|
("yes"/"no"). Default excludes are used when omitted.</td> |
|
|
|
|
|
<td valign="top" align="center">No</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><zip zipfile="${dist}/manual.zip" basedir="htdocs/manual" |
|
|
|
|
|
items="*" /></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<pre> <zip zipfile="${dist}/manual.zip" |
|
|
|
|
|
basedir="htdocs/manual" |
|
|
|
|
|
/></pre> |
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
in the <code>${dist}</code> directory.</p> |
|
|
in the <code>${dist}</code> directory.</p> |
|
|
<blockquote> |
|
|
|
|
|
<p><code><zip zipfile="${dist}/manual.zip" basedir="htdocs/manual" |
|
|
|
|
|
items="*" ignore="mydocs, todo.html"/></code></p> |
|
|
|
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<pre> <zip zipfile="${dist}/manual.zip" |
|
|
|
|
|
basedir="htdocs/manual" |
|
|
|
|
|
excludes="mydocs/**, **/todo.html" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
|
|
|
in the <code>${dist}</code> directory. Files in the directory <code>mydocs</code>, |
|
|
|
|
|
or files with the name <code>todo.html</code> are excluded.</p> |
|
|
|
|
|
<pre> <zip zipfile="${dist}/manual.zip" |
|
|
|
|
|
basedir="htdocs/manual" |
|
|
|
|
|
includes="api/**/*.html" |
|
|
|
|
|
excludes="**/todo.html" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
|
|
|
in the <code>${dist}</code> directory. Only html files under the directory <code>api</code> |
|
|
|
|
|
are zipped, and files with the name <code>todo.html</code> are excluded.</p> |
|
|
|
|
|
<h3>Deprecated examples</h3> |
|
|
|
|
|
<pre> <zip zipfile="${dist}/manual.zip" basedir="htdocs/manual" items="*" /></pre> |
|
|
|
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
|
|
|
in the <code>${dist}</code> directory.</p> |
|
|
|
|
|
<pre> <zip zipfile="${dist}/manual.zip" basedir="htdocs/manual" items="*" ignore="mydocs, todo.html"/></pre> |
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
<p>zips all files in the <code>htdocs/manual</code> directory in a file called <code>manual.zip</code> |
|
|
in the <code>${dist}</code> directory. Files/directories with the names <code>mydocs</code> |
|
|
in the <code>${dist}</code> directory. Files/directories with the names <code>mydocs</code> |
|
|
and <code>todo.html</code> are excluded.</p> |
|
|
and <code>todo.html</code> are excluded.</p> |
|
@@ -1504,7 +1773,7 @@ it encounters for a specific task in the buildfile, before it executes is.</p> |
|
|
<p>Let's write our own task, that prints a message on the System.out stream. The |
|
|
<p>Let's write our own task, that prints a message on the System.out stream. The |
|
|
task has one attribute called "message".</p> |
|
|
task has one attribute called "message".</p> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre>public class MyVeryOwnTask extends Task { |
|
|
|
|
|
|
|
|
<pre>public class MyVeryOwnTask extends Task { |
|
|
private String msg; |
|
|
private String msg; |
|
|
|
|
|
|
|
|
// The method executing the task |
|
|
// The method executing the task |
|
@@ -1529,7 +1798,7 @@ task has one attribute called "message".</p> |
|
|
</ol> |
|
|
</ol> |
|
|
<h3>Example</h3> |
|
|
<h3>Example</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<pre><project name="TaskTest" default="test" basedir="."> |
|
|
|
|
|
|
|
|
<pre><project name="TaskTest" default="test" basedir="."> |
|
|
<target name="init"> |
|
|
<target name="init"> |
|
|
<taskdef name="mytask" class="com.mydomain.MyVeryOwnTask"/> |
|
|
<taskdef name="mytask" class="com.mydomain.MyVeryOwnTask"/> |
|
|
</target> |
|
|
</target> |
|
@@ -1548,8 +1817,8 @@ package. Then you can use it as if it were a built in task.</p> |
|
|
<p>To provide feedback on this software, please subscribe to the Ant Development |
|
|
<p>To provide feedback on this software, please subscribe to the Ant Development |
|
|
Mail List <a href="mailto:(ant-dev-subscribe@jakarta.apache.org">(ant-dev-subscribe@jakarta.apache.org</a>)</p> |
|
|
Mail List <a href="mailto:(ant-dev-subscribe@jakarta.apache.org">(ant-dev-subscribe@jakarta.apache.org</a>)</p> |
|
|
<hr> |
|
|
<hr> |
|
|
<p align="center">Copyright © 2000 Apache Software Foundation. All |
|
|
|
|
|
rights Reserved.</p> |
|
|
|
|
|
|
|
|
<p align="center">Copyright © 2000 Apache Software Foundation. All rights |
|
|
|
|
|
Reserved.</p> |
|
|
|
|
|
|
|
|
</body> |
|
|
</body> |
|
|
|
|
|
|
|
|