@@ -107,8 +107,8 @@ target="_top">FAQ</a> for this task at his homepage.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>java2iiopParams</td> | <td>java2iiopParams</td> | ||||
<td>If filled, the params are added to the <code>java2iiop</code> command | |||||
(ex: <code>-no_warn_missing_define</code>)</td> | |||||
<td>If filled, the params are added to the <kbd>java2iiop</kbd> command | |||||
(ex: <kbd>-no_warn_missing_define</kbd>)</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -281,7 +281,7 @@ omitted an even more complex situation arises:</p> | |||||
the above table recursively.</p> | the above table recursively.</p> | ||||
<p>If the <var>basedir</var> of the outermost build has been specified as a property on the command | <p>If the <var>basedir</var> of the outermost build has been specified as a property on the command | ||||
line (i.e. <code>-Dbasedir=some-value</code> or a <code>-propertyfile</code> argument) the value | |||||
line (i.e. <kbd>-Dbasedir=some-value</kbd> or a <kbd>-propertyfile</kbd> argument) the value | |||||
provided will get an even higher priority. For any <code><ant></code> task that doesn't | provided will get an even higher priority. For any <code><ant></code> task that doesn't | ||||
specify a <var>dir</var> attribute, the new project's <var>basedir</var> will be the value specified | specify a <var>dir</var> attribute, the new project's <var>basedir</var> will be the value specified | ||||
on the command line—no matter how deeply nested into layers of build files the task may | on the command line—no matter how deeply nested into layers of build files the task may | ||||
@@ -38,7 +38,7 @@ the <var>glib</var> attribute) is newer than the generated files.</p> | |||||
distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a> for more | distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a> for more | ||||
information.</p> | information.</p> | ||||
<p>Antlr 2.7.2 Note: <em>You will need <samp>antlrall.jar</samp> that can be created by | <p>Antlr 2.7.2 Note: <em>You will need <samp>antlrall.jar</samp> that can be created by | ||||
the <code>antlr-all.jar</code> target of the Makefile provided with the download.</em></p> | |||||
the <q>antlr-all.jar</q> target of the Makefile provided with the download.</em></p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -46,7 +46,7 @@ as <code>#IMPLIED</code>.</p> | |||||
<p><em>Since Ant 1.7</em> custom structure printers can be used instead of the one that emits a DTD. | <p><em>Since Ant 1.7</em> custom structure printers can be used instead of the one that emits a DTD. | ||||
In order to plug in your own structure, you have to implement the | In order to plug in your own structure, you have to implement the | ||||
interface <code>org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter</code> | |||||
interface <code class="code">org.apache.tools.ant.taskdefs.AntStructure.StructurePrinter</code> | |||||
and <code><typedef></code> your class and use the new type as a nested element of this | and <code><typedef></code> your class and use the new type as a nested element of this | ||||
task—see the example below. | task—see the example below. | ||||
@@ -47,7 +47,7 @@ the <var>input</var> and <var>inputstring</var> attributes.</p> | |||||
<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> | <h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> | ||||
<p>If you run Ant as a background process (like <code>ant &</code>) and use | |||||
<p>If you run Ant as a background process (like <kbd>ant &</kbd>) and use | |||||
the <code><apply></code> task with <var>spawn</var> set to <q>false</q>, you must provide | the <code><apply></code> task with <var>spawn</var> set to <q>false</q>, you must provide | ||||
explicit input to the forked process or Ant will be suspended because it tries to read from the | explicit input to the forked process or Ant will be suspended because it tries to read from the | ||||
standard input.</p> | standard input.</p> | ||||
@@ -214,7 +214,7 @@ standard input.</p> | |||||
<tr> | <tr> | ||||
<td>vmlauncher</td> | <td>vmlauncher</td> | ||||
<td>Run command using the JVM's execution facilities where available. If set to <q>false</q> the | <td>Run command using the JVM's execution facilities where available. If set to <q>false</q> the | ||||
underlying OS's shell, either directly or through the <code>antRun</code> scripts, will be | |||||
underlying OS's shell, either directly or through the <kbd>antRun</kbd> scripts, will be | |||||
used. Under some operating systems, this gives access to facilities not normally available | used. Under some operating systems, this gives access to facilities not normally available | ||||
through JVM including, under Windows, being able to execute scripts, rather than their | through JVM including, under Windows, being able to execute scripts, rather than their | ||||
associated interpreter. If you want to specify the name of the executable as a relative path | associated interpreter. If you want to specify the name of the executable as a relative path | ||||
@@ -360,9 +360,9 @@ of <code>exec</code>.</p> | |||||
</fileset> | </fileset> | ||||
<fileset refid="other.files"/> | <fileset refid="other.files"/> | ||||
</apply></pre> | </apply></pre> | ||||
<p>invokes <code>ls -l</code>, adding the absolute filenames of all files below <samp>/tmp</samp> | |||||
not ending in <samp>.txt</samp> and all files of the FileSet | |||||
with <var>id</var> <samp>other.files</samp> to the command line.</p> | |||||
<p>invokes <kbd>ls -l</kbd>, adding the absolute filenames of all files below <samp>/tmp</samp> not | |||||
ending in <samp>.txt</samp> and all files of the FileSet with <var>id</var> <samp>other.files</samp> | |||||
to the command line.</p> | |||||
<pre> | <pre> | ||||
<apply executable="somecommand" parallel="false"> | <apply executable="somecommand" parallel="false"> | ||||
<arg value="arg1"/> | <arg value="arg1"/> | ||||
@@ -384,7 +384,7 @@ with the absolute filenames of all files separated by spaces.</p> | |||||
<fileset dir="src/C" includes="*.c"/> | <fileset dir="src/C" includes="*.c"/> | ||||
<mapper type="glob" from="*.c" to="*.o"/> | <mapper type="glob" from="*.c" to="*.o"/> | ||||
</apply></pre> | </apply></pre> | ||||
<p>invokes <code>cc -c -o TARGETFILE SOURCEFILE</code> for each <samp>.c</samp> file that is newer | |||||
<p>invokes <kbd>cc -c -o TARGETFILE SOURCEFILE</kbd> for each <samp>.c</samp> file that is newer | |||||
than the corresponding <samp>.o</samp>, replacing <code>TARGETFILE</code> with the absolute filename | than the corresponding <samp>.o</samp>, replacing <code>TARGETFILE</code> with the absolute filename | ||||
of the <samp>.o</samp> and <code>SOURCEFILE</code> with the absolute name of the <samp>.c</samp> | of the <samp>.o</samp> and <code>SOURCEFILE</code> with the absolute name of the <samp>.c</samp> | ||||
file.</p> | file.</p> | ||||
@@ -400,7 +400,7 @@ file.</p> | |||||
<outputmapper refid="out"/> | <outputmapper refid="out"/> | ||||
</redirector> | </redirector> | ||||
</apply></pre> | </apply></pre> | ||||
<p>Applies the fictitious <code>processfile</code> executable to all files | |||||
<p>Applies the fictitious <kbd>processfile</kbd> executable to all files | |||||
matching <samp>*.file</samp> in the <samp>src</samp> directory. | matching <samp>*.file</samp> in the <samp>src</samp> directory. | ||||
The <samp>out</samp> <code><mapper></code> has been set up to map <samp>*.file</samp> | The <samp>out</samp> <code><mapper></code> has been set up to map <samp>*.file</samp> | ||||
to <samp>*.out</samp>, then this <code><mapper></code> is used to | to <samp>*.out</samp>, then this <code><mapper></code> is used to | ||||
@@ -416,7 +416,7 @@ dependency checking against output files—the target files in this case.</p | |||||
</path> | </path> | ||||
<identitymapper/> | <identitymapper/> | ||||
</apply></pre> | </apply></pre> | ||||
<p>Applies the <code>ls</code> executable to all directories in the <code>PATH</code>, effectively | |||||
<p>Applies the <kbd>ls</kbd> executable to all directories in the <code>PATH</code>, effectively | |||||
listing all executables that are available on the <code>PATH</code>.</p> | listing all executables that are available on the <code>PATH</code>.</p> | ||||
<pre> | <pre> | ||||
@@ -431,7 +431,7 @@ listing all executables that are available on the <code>PATH</code>.</p> | |||||
<outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/> | <outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/> | ||||
</redirector> | </redirector> | ||||
</apply></pre> | </apply></pre> | ||||
<p>Conversion of the command <code>jsmin < src/a.js > dest/a.js</code> but for all files in | |||||
<p>Conversion of the command <kbd>jsmin < src/a.js > dest/a.js</kbd> but for all files in | |||||
the <samp>src</samp> directory. Because the filename itself should not be passed to | the <samp>src</samp> directory. Because the filename itself should not be passed to | ||||
the <code>jsmin</code> program, the <var>addsourcefile</var> is set to <q>false</q>.</p> | the <code>jsmin</code> program, the <var>addsourcefile</var> is set to <q>false</q>.</p> | ||||
@@ -104,7 +104,7 @@ alternative.</p> | |||||
<!--tr> | <!--tr> | ||||
<td>parallel</td> | <td>parallel</td> | ||||
<td>process all specified files using a single | <td>process all specified files using a single | ||||
<code>chmod</code> command.</td> | |||||
<kbd>chmod</kbd> command.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -103,11 +103,11 @@ on system parameters.</p> | |||||
</table> | </table> | ||||
<h3>Parameters specified as nested elements</h3> | <h3>Parameters specified as nested elements</h3> | ||||
<h4>classpath</h4> | <h4>classpath</h4> | ||||
<p><code>Available</code>'s <code>classpath</code> attribute is | |||||
<p><code>Available</code>'s <var>classpath</var> attribute is | |||||
a <a href="../using.html#path">path-like structure</a> and can also be set via a nested | a <a href="../using.html#path">path-like structure</a> and can also be set via a nested | ||||
<code><classpath></code> element.</p> | <code><classpath></code> element.</p> | ||||
<h4>filepath</h4> | <h4>filepath</h4> | ||||
<p><code>Available</code>'s <code>filepath</code> attribute is | |||||
<p><code>Available</code>'s <var>filepath</var> attribute is | |||||
a <a href="../using.html#path">path-like structure</a> and can also be set via a | a <a href="../using.html#path">path-like structure</a> and can also be set via a | ||||
nested <code><filepath></code> element.</p> | nested <code><filepath></code> element.</p> | ||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
@@ -28,7 +28,7 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>The cab task creates Microsoft cabinet archive files. It is invoked similar to | <p>The cab task creates Microsoft cabinet archive files. It is invoked similar to | ||||
the <a href="../Tasks/jar.html">jar</a> or <a href="../Tasks/zip.html">zip</a> tasks. This task | the <a href="../Tasks/jar.html">jar</a> or <a href="../Tasks/zip.html">zip</a> tasks. This task | ||||
will work on Windows using the external <code>cabarc</code> tool (provided by Microsoft) which must | |||||
will work on Windows using the external <kbd>cabarc</kbd> tool (provided by Microsoft) which must | |||||
be located in your executable path.</p> | be located in your executable path.</p> | ||||
<p>To use this task on other platforms you need to download and compile <code>libcabinet</code> | <p>To use this task on other platforms you need to download and compile <code>libcabinet</code> | ||||
from <a href="https://www.freshports.org/archivers/libcabinet/" | from <a href="https://www.freshports.org/archivers/libcabinet/" | ||||
@@ -34,14 +34,14 @@ | |||||
</ul> | </ul> | ||||
<p>These Apache Ant tasks are wrappers around Continuus Source Manager. They have been tested | <p>These Apache Ant tasks are wrappers around Continuus Source Manager. They have been tested | ||||
against versions 5.1/6.2 on Windows 2000, but should work on other platforms with <code>ccm</code> | |||||
against versions 5.1/6.2 on Windows 2000, but should work on other platforms with <kbd>ccm</kbd> | |||||
installed.</p> | installed.</p> | ||||
<hr/> | <hr/> | ||||
<h2 id="ccmcheckin">CCMCheckin</h2> | <h2 id="ccmcheckin">CCMCheckin</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to checkin a file</p> | |||||
<p>Check in a file to Continuus</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -66,7 +66,7 @@ installed.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ccmdir</td> | <td>ccmdir</td> | ||||
<td>path to the <code>ccm</code> executable file, required if it is not on | |||||
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on | |||||
the <code>PATH</code></td> | the <code>PATH</code></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -84,7 +84,7 @@ as a comment. The task used is the one set as the default.</p> | |||||
<h2 id="ccmcheckout">CCMCheckout</h2> | <h2 id="ccmcheckout">CCMCheckout</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a checkout command to Continuus</p> | |||||
<p>Run a Continuus checkout command</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -113,7 +113,7 @@ as a comment. The task used is the one set as the default.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ccmdir</td> | <td>ccmdir</td> | ||||
<td>path to the <code>ccm</code> executable file, required if it is not on | |||||
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on | |||||
the <code>PATH</code></td> | the <code>PATH</code></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -143,7 +143,7 @@ the default.</p> | |||||
<h2 id="ccmcheckintask">CCMCheckinTask</h2> | <h2 id="ccmcheckintask">CCMCheckinTask</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a checkin default task command to Continuus</p> | |||||
<p>Run a Continuus command to checkin default task</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -163,7 +163,7 @@ the default.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ccmdir</td> | <td>ccmdir</td> | ||||
<td>path to the <code>ccm</code> executable file, required if it is not on | |||||
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on | |||||
the <code>PATH</code></td> | the <code>PATH</code></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -178,7 +178,7 @@ the default.</p> | |||||
<h2 id="ccmreconfigure">CCMReconfigure</h2> | <h2 id="ccmreconfigure">CCMReconfigure</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform an reconfigure command to Continuus.</p> | |||||
<p>Run a Continuus reconfigure/update command</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -203,7 +203,7 @@ the default.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ccmdir</td> | <td>ccmdir</td> | ||||
<td>path to the <code>ccm</code> executable file, required if it is not on | |||||
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on | |||||
the <code>PATH</code></td> | the <code>PATH</code></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -240,7 +240,7 @@ the default.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ccmdir</td> | <td>ccmdir</td> | ||||
<td>path to the <code>ccm</code> executable file, required if it is not on | |||||
<td>path to the <kbd>ccm</kbd> executable file, required if it is not on | |||||
the <code>PATH</code></td> | the <code>PATH</code></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -28,10 +28,10 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Generates an XML-formatted report file of the change logs recorded in | <p>Generates an XML-formatted report file of the change logs recorded in | ||||
a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p> | a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p> | ||||
<p><strong>Important</strong>: This task needs <code>cvs</code> on the path. If it isn't, you will | |||||
get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, | |||||
try to execute <code>cvs.exe</code> from the command line in the target directory in which you are | |||||
working. Also note that this task assumes that the cvs executable is compatible with the Unix | |||||
<p><strong>Important</strong>: This task needs <kbd>cvs</kbd> on the path. If it isn't, you will get | |||||
an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, try to | |||||
execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you are working. | |||||
Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with the Unix | |||||
version, this is not completely true for certain other CVS clients—like CVSNT for | version, this is not completely true for certain other CVS clients—like CVSNT for | ||||
example—and some operation may fail when using such an incompatible client.</p> | example—and some operation may fail when using such an incompatible client.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -87,7 +87,7 @@ example—and some operation may fail when using such an incompatible client | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>dir</td> | <td>dir</td> | ||||
<td>The directory from which to run the CVS <em>log</em> command.</td> | |||||
<td>The directory from which to run the <kbd>cvs log</kbd> command.</td> | |||||
<td>No; defaults to <q>${basedir}</q></td> | <td>No; defaults to <q>${basedir}</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -119,7 +119,7 @@ example—and some operation may fail when using such an incompatible client | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>remote</td> | <td>remote</td> | ||||
<td>If set to true, works against the repository (using <code>rlog</code>) without a working | |||||
<td>If set to true, works against the repository (using <kbd>cvs rlog</kbd>) without a working | |||||
copy. <em>Since Ant 1.8.0</em></td> | copy. <em>Since Ant 1.8.0</em></td> | ||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
</tr> | </tr> | ||||
@@ -33,7 +33,7 @@ broken recently. If you are going to use the task to create checksums used in a | |||||
security is important, please take some time to investigate the algorithms offered by your JCE | security is important, please take some time to investigate the algorithms offered by your JCE | ||||
provider. Note also that some JCE providers like the one by <a href="https://www.bouncycastle.org/" | provider. Note also that some JCE providers like the one by <a href="https://www.bouncycastle.org/" | ||||
target="_top">The Legion of the Bouncy Castle</a>, | target="_top">The Legion of the Bouncy Castle</a>, | ||||
the <a href="https://www.gnu.org/software/gnu-crypto/" target="_top">GNU project</a> | |||||
the <a href="https://www.gnu.org/software/gnu-crypto/" target="_top">GNU Crypto project</a> | |||||
or <a href="https://jce.iaik.tugraz.at/sic/Products" target="_top">the Technical University Graz</a> | or <a href="https://jce.iaik.tugraz.at/sic/Products" target="_top">the Technical University Graz</a> | ||||
offer more digest algorithms than those built-in into your JDK.</p> | offer more digest algorithms than those built-in into your JDK.</p> | ||||
@@ -30,7 +30,7 @@ | |||||
<p>Changes the group of a file or all files inside specified directories. Right now it has effect | <p>Changes the group of a file or all files inside specified directories. Right now it has effect | ||||
only under Unix. The group attribute is equivalent to the corresponding argument for | only under Unix. The group attribute is equivalent to the corresponding argument for | ||||
the <code>chgrp</code> command.</p> | |||||
the <kbd>chgrp</kbd> command.</p> | |||||
<p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s | <p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s | ||||
or <a href="../Types/filelist.html">FileList</a>s can be specified using | or <a href="../Types/filelist.html">FileList</a>s can be specified using | ||||
@@ -41,7 +41,7 @@ elements.</p> | |||||
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested | arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested | ||||
elements.</p> | elements.</p> | ||||
<p>By default this task will use a single invocation of the underlying <code>chgrp</code> command. | |||||
<p>By default this task will use a single invocation of the underlying <kbd>chgrp</kbd> command. | |||||
If you are working on a large number of files this may result in a command line that is too long for | If you are working on a large number of files this may result in a command line that is too long for | ||||
your operating system. If you encounter such problems, you should set the <var>maxparallel</var> | your operating system. If you encounter such problems, you should set the <var>maxparallel</var> | ||||
attribute of this task to a non-zero value. The number to use highly depends on the length of your | attribute of this task to a non-zero value. The number to use highly depends on the length of your | ||||
@@ -51,7 +51,7 @@ may give you an approximation for the number you could use as initial value for | |||||
experiments.</p> | experiments.</p> | ||||
<p>By default this task won't do anything unless it detects it is running on a Unix system. If you | <p>By default this task won't do anything unless it detects it is running on a Unix system. If you | ||||
know for sure that you have a <code>chgrp</code> executable on your <code>PATH</code> that is | |||||
know for sure that you have a <kbd>chgrp</kbd> executable on your <code>PATH</code> that is | |||||
command line compatible with the Unix command, you can use the task's <var>os</var> attribute and | command line compatible with the Unix command, you can use the task's <var>os</var> attribute and | ||||
set its value to your current OS.</p> | set its value to your current OS.</p> | ||||
@@ -74,7 +74,7 @@ set its value to your current OS.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>parallel</td> | <td>parallel</td> | ||||
<td>process all specified files using a single <code>chgrp</code> command.</td> | |||||
<td>process all specified files using a single <kbd>chgrp</kbd> command.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -28,7 +28,7 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Changes the permissions of a file or all files inside specified directories. Right now it has | <p>Changes the permissions of a file or all files inside specified directories. Right now it has | ||||
effect only under Unix or NonStop Kernel (Tandem). The permissions are also UNIX style, like the | effect only under Unix or NonStop Kernel (Tandem). The permissions are also UNIX style, like the | ||||
argument for the <code>chmod</code> command.</p> | |||||
argument for the <kbd>chmod</kbd> command.</p> | |||||
<p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on | <p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on | ||||
how the inclusion/exclusion of files works, and how to write patterns.</p> | how the inclusion/exclusion of files works, and how to write patterns.</p> | ||||
@@ -44,7 +44,7 @@ nested <a href="../Types/filelist.html">filelist</a>s.</p> | |||||
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested | arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested | ||||
elements.</p> | elements.</p> | ||||
<p>By default this task will use a single invocation of the underlying <code>chmod</code> command. | |||||
<p>By default this task will use a single invocation of the underlying <kbd>chmod</kbd> command. | |||||
If you are working on a large number of files this may result in a command line that is too long for | If you are working on a large number of files this may result in a command line that is too long for | ||||
your operating system. If you encounter such problems, you should set the <var>maxparallel</var> | your operating system. If you encounter such problems, you should set the <var>maxparallel</var> | ||||
attribute of this task to a non-zero value. The number to use highly depends on the length of your | attribute of this task to a non-zero value. The number to use highly depends on the length of your | ||||
@@ -54,7 +54,7 @@ may give you an approximation for the number you could use as initial value for | |||||
experiments.</p> | experiments.</p> | ||||
<p>By default this task won't do anything unless it detects it is running on a Unix system. If you | <p>By default this task won't do anything unless it detects it is running on a Unix system. If you | ||||
know for sure that you have a <code>chmod</code> executable on your <code>PATH</code> that is | |||||
know for sure that you have a <kbd>chmod</kbd> executable on your <code>PATH</code> that is | |||||
command line compatible with the Unix command, you can use the task's <var>os</var> attribute and | command line compatible with the Unix command, you can use the task's <var>os</var> attribute and | ||||
set its value to your current OS.</p> | set its value to your current OS.</p> | ||||
@@ -103,7 +103,7 @@ alternative.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>parallel</td> | <td>parallel</td> | ||||
<td>process all specified files using a single <code>chmod</code> command.</td> | |||||
<td>process all specified files using a single <kbd>chmod</kbd> command.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -30,7 +30,7 @@ | |||||
<p>Changes the owner of a file or all files inside specified directories. Right now it has effect | <p>Changes the owner of a file or all files inside specified directories. Right now it has effect | ||||
only under Unix. The owner attribute is equivalent to the corresponding argument for | only under Unix. The owner attribute is equivalent to the corresponding argument for | ||||
the <code>chown</code> command.</p> | |||||
the <kbd>chown</kbd> command.</p> | |||||
<p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s | <p><a href="../Types/fileset.html">FileSet</a>s, <a href="../Types/dirset.html">DirSet</a>s | ||||
or <a href="../Types/filelist.html">FileList</a>s can be specified using | or <a href="../Types/filelist.html">FileList</a>s can be specified using | ||||
@@ -41,7 +41,7 @@ elements.</p> | |||||
arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested | arbitrary <a href="../Types/resources.html#collection">resource collections</a> as nested | ||||
elements.</p> | elements.</p> | ||||
<p>By default this task will use a single invocation of the underlying <code>chown</code> command. | |||||
<p>By default this task will use a single invocation of the underlying <kbd>chown</kbd> command. | |||||
If you are working on a large number of files this may result in a command line that is too long for | If you are working on a large number of files this may result in a command line that is too long for | ||||
your operating system. If you encounter such problems, you should set the <var>maxparallel</var> | your operating system. If you encounter such problems, you should set the <var>maxparallel</var> | ||||
attribute of this task to a non-zero value. The number to use highly depends on the length of your | attribute of this task to a non-zero value. The number to use highly depends on the length of your | ||||
@@ -51,9 +51,9 @@ may give you an approximation for the number you could use as initial value for | |||||
experiments.</p> | experiments.</p> | ||||
<p>By default this task won't do anything unless it detects it is running on a Unix system. If you | <p>By default this task won't do anything unless it detects it is running on a Unix system. If you | ||||
know for sure that you have a <code>chown</code> executable on your <code>PATH</code> that is | |||||
command line compatible with the Unix command, you can use the task's os attribute and set its value | |||||
to your current os.</p> | |||||
know for sure that you have a <kbd>chown</kbd> executable on your <code>PATH</code> that is command | |||||
line compatible with the Unix command, you can use the task's <var>os</var> attribute and set its | |||||
value to your current OS.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -75,7 +75,7 @@ to your current os.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>parallel</td> | <td>parallel</td> | ||||
<td>process all specified files using a single <code>chown</code> command.</td> | |||||
<td>process all specified files using a single <kbd>chown</kbd> command.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -55,19 +55,20 @@ Sean Egan (sean at cm-logic dot com)</p> | |||||
<hr/> | <hr/> | ||||
<h2 id="introduction">Introduction</h2> | <h2 id="introduction">Introduction</h2> | ||||
<p>Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to | <p>Apache Ant provides several optional tasks for working with ClearCase. These tasks correspond to | ||||
various ClearCase commands using the <code>cleartool</code> program. The current tasks available for | |||||
various ClearCase commands using the <kbd>cleartool</kbd> program. The current tasks available for | |||||
Ant correspond to only a few of the significant ClearCase commands.</p> | Ant correspond to only a few of the significant ClearCase commands.</p> | ||||
<p>More tasks can be easily added by deriving from the ClearCase class and then adding functionality | <p>More tasks can be easily added by deriving from the ClearCase class and then adding functionality | ||||
that is specific to that ClearCase command.</p> | that is specific to that ClearCase command.</p> | ||||
<p>Important: these tasks all require <code>cleartool</code> on the command line. If a task fails | |||||
with an IOException, especially <code>error=2</code> on Windows, this is your problem.</p> | |||||
<p>Important: these tasks all require <kbd>cleartool</kbd> on the command line. If a task fails | |||||
with an <code>IOException</code>, especially <code>error=2</code> on Windows, this is your | |||||
problem.</p> | |||||
<hr/> | <hr/> | ||||
<h2 id="cccheckin">CCCheckin</h2> | <h2 id="cccheckin">CCCheckin</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool checkin</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool checkin</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -132,7 +133,7 @@ original.</p> | |||||
<h2 id="cccheckout">CCCheckout</h2> | <h2 id="cccheckout">CCCheckout</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool checkout</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool checkout</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -214,7 +215,7 @@ suppressed. A "<samp>Some comment text</samp>" is added to ClearCase a | |||||
<h2 id="ccuncheckout">CCUnCheckout</h2> | <h2 id="ccuncheckout">CCUnCheckout</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>uncheckout</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool uncheckout</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -249,7 +250,7 @@ of the file called <samp>c:/views/viewdir/afile.keep</samp> is kept.</p> | |||||
<h2 id="ccupdate">CCUpdate</h2> | <h2 id="ccupdate">CCUpdate</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform an <code>cleartool update</code> command to ClearCase.</p> | |||||
<p>Task to perform an <kbd>cleartool update</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -319,7 +320,7 @@ set to the current time.</p> | |||||
<h2 id="ccmklbtype">CCMklbtype</h2> | <h2 id="ccmklbtype">CCMklbtype</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>mklbtype</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool mklbtype</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -394,7 +395,7 @@ version 1</q> is added as a comment.</p> | |||||
<h2 id="ccmklabel">CCMklabel</h2> | <h2 id="ccmklabel">CCMklabel</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>mklabel</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool mklabel</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -466,7 +467,7 @@ added as a comment. It will <em>recurse</em> all subdirectories.</p> | |||||
<h2 id="ccrmtype">CCRmtype</h2> | <h2 id="ccrmtype">CCRmtype</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>rmtype</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool rmtype</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -557,7 +558,7 @@ comment. All instances of the type are removed, including the type object itself | |||||
<h2 id="cclock">CCLock</h2> | <h2 id="cclock">CCLock</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool lock</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool lock</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -617,7 +618,7 @@ object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p> | |||||
<h2 id="ccunlock">CCUnlock</h2> | <h2 id="ccunlock">CCUnlock</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool unlock</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool unlock</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -662,7 +663,7 @@ object <samp>stream:Application_Integration@\MyProject_PVOB</samp>.</p> | |||||
<h2 id="ccmkbl">CCMkbl</h2> | <h2 id="ccmkbl">CCMkbl</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool mkbl</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool mkbl</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -727,7 +728,7 @@ named <samp>Application_Baseline_AUTO</samp>.</p> | |||||
<h2 id="ccmkattr">CCMkattr</h2> | <h2 id="ccmkattr">CCMkattr</h2> | ||||
<p><em>Since Ant 1.6.1</em></p> | <p><em>Since Ant 1.6.1</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool mkattr</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool mkattr</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -796,7 +797,7 @@ the attribute <samp>BugFix</samp> with a value of <samp>34445</samp> to it.</p> | |||||
<h2 id="ccmkdir">CCMkdir</h2> | <h2 id="ccmkdir">CCMkdir</h2> | ||||
<p><em>Since Ant 1.6.1</em></p> | <p><em>Since Ant 1.6.1</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool mkdir</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool mkdir</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -844,7 +845,7 @@ automatically check it out.</p> | |||||
<h2 id="ccmkelem">CCMkelem</h2> | <h2 id="ccmkelem">CCMkelem</h2> | ||||
<p><em>Since Ant 1.6.1</em></p> | <p><em>Since Ant 1.6.1</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Task to perform a <code>cleartool mkelem</code> command to ClearCase.</p> | |||||
<p>Task to perform a <kbd>cleartool mkelem</kbd> command to ClearCase.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -682,7 +682,7 @@ two resources can be checked; in this case all resources must match.</p> | |||||
<p><em>Since Ant 1.7.1</em></p> | <p><em>Since Ant 1.7.1</em></p> | ||||
<p>Tests whether a resource contains a given (sub)string.</p> | <p>Tests whether a resource contains a given (sub)string.</p> | ||||
<p>The resources to check are specified via references or—in the case of file | <p>The resources to check are specified via references or—in the case of file | ||||
resources—via the resource attribute.</p> | |||||
resources—via the <var>resource</var> attribute.</p> | |||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
<th>Attribute</th> | <th>Attribute</th> | ||||
@@ -755,7 +755,8 @@ fails.</p> | |||||
<p>There is also a nested <code><classpath></code> element, which can be used to specify a | <p>There is also a nested <code><classpath></code> element, which can be used to specify a | ||||
classpath.</p> | classpath.</p> | ||||
<pre><hasmethod classname="java.util.ArrayList" method="trimToSize"/></pre> | <pre><hasmethod classname="java.util.ArrayList" method="trimToSize"/></pre> | ||||
<p>Looks for the method <code>trimToSize()</code> in the <code>java.util.ArrayList</code> class.</p> | |||||
<p>Looks for the method <code class="code">trimToSize()</code> in | |||||
the <code class="code">java.util.ArrayList</code> class.</p> | |||||
<h4 id="matches">matches</h4> | <h4 id="matches">matches</h4> | ||||
<p><em>Since Ant 1.7</em></p> | <p><em>Since Ant 1.7</em></p> | ||||
@@ -279,8 +279,8 @@ default character encoding is Cp1252, on Unix it is usually UTF-8. For both of t | |||||
are illegal byte sequences (more in UTF-8 than for Cp1252).</p> | are illegal byte sequences (more in UTF-8 than for Cp1252).</p> | ||||
<p>How the Reader class deals with these illegal sequences is up to the implementation of the | <p>How the Reader class deals with these illegal sequences is up to the implementation of the | ||||
character decoder. The current Sun Java implementation is to map them to legal characters. Previous | character decoder. The current Sun Java implementation is to map them to legal characters. Previous | ||||
Sun Java (1.3 and lower) threw a MalformedInputException. IBM Java 1.4 also throws this exception. | |||||
It is the mapping of the characters that cause the corruption.</p> | |||||
Sun Java (1.3 and lower) threw a <code>MalformedInputException</code>. IBM Java 1.4 also throws this | |||||
exception. It is the mapping of the characters that cause the corruption.</p> | |||||
<p>On Unix, where the default is normally UTF-8, this is a <em>big</em> problem, as it is easy to | <p>On Unix, where the default is normally UTF-8, this is a <em>big</em> problem, as it is easy to | ||||
edit a file to contain non US-ASCII characters from ISO-8859-1, for example the Danish œ | edit a file to contain non US-ASCII characters from ISO-8859-1, for example the Danish œ | ||||
character. When this is copied (with filtering) by Ant, the character get converted to a question | character. When this is copied (with filtering) by Ant, the character get converted to a question | ||||
@@ -28,11 +28,11 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Handles packages/modules retrieved from a <a href="https://www.nongnu.org/cvs/" | <p>Handles packages/modules retrieved from a <a href="https://www.nongnu.org/cvs/" | ||||
target="_top">CVS</a> repository.</p> | target="_top">CVS</a> repository.</p> | ||||
<p><strong>Important:</strong> This task needs <code>cvs</code> binary on the path. If it isn't, you | |||||
<p><strong>Important:</strong> This task needs <kbd>cvs</kbd> binary on the path. If it isn't, you | |||||
will get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't | will get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't | ||||
work, try to execute <code>cvs.exe</code> from the command line in the target directory in which you | |||||
are working. Also note that this task assumes that the cvs executable is compatible with the Unix | |||||
version, this is not completely true for certain other CVS clients—like CVSNT for | |||||
work, try to execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you | |||||
are working. Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with | |||||
the Unix version, this is not completely true for certain other CVS clients—like CVSNT for | |||||
example—and some operation may fail when using such an incompatible client.</p> | example—and some operation may fail when using such an incompatible client.</p> | ||||
<p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If | <p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If | ||||
@@ -61,7 +61,7 @@ report 21657</a> for recommended workarounds.</p> | |||||
<tr> | <tr> | ||||
<td>compressionlevel</td> | <td>compressionlevel</td> | ||||
<td>A number between <q>1</q> and <q>9</q> (corresponding to possible values for | <td>A number between <q>1</q> and <q>9</q> (corresponding to possible values for | ||||
CVS <code>-z#</code> argument). Any other value is treated | |||||
CVS <kbd>-z#</kbd> argument). Any other value is treated | |||||
as <var>compression</var>=<q>false</q></td> | as <var>compression</var>=<q>false</q></td> | ||||
<td>No; defaults to no compression</td> | <td>No; defaults to no compression</td> | ||||
</tr> | </tr> | ||||
@@ -78,7 +78,7 @@ report 21657</a> for recommended workarounds.</p> | |||||
<tr> | <tr> | ||||
<td>dest</td> | <td>dest</td> | ||||
<td>the directory where the checked out files should be placed. Note that this is different | <td>the directory where the checked out files should be placed. Note that this is different | ||||
from CVS's <code>-d</code> command line switch as Apache Ant will never shorten pathnames to | |||||
from CVS's <kbd>-d</kbd> command line switch as Apache Ant will never shorten pathnames to | |||||
avoid empty directories.</td> | avoid empty directories.</td> | ||||
<td>No; default is project's <var>basedir</var></td> | <td>No; default is project's <var>basedir</var></td> | ||||
</tr> | </tr> | ||||
@@ -101,13 +101,13 @@ report 21657</a> for recommended workarounds.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>quiet</td> | <td>quiet</td> | ||||
<td>suppress informational messages. This is the same as <code>-q</code> on the command | |||||
<td>suppress informational messages. This is the same as <kbd>-q</kbd> on the command | |||||
line.</td> | line.</td> | ||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>reallyquiet</td> | <td>reallyquiet</td> | ||||
<td>suppress all messages. This is the same as <code>-Q</code> on the command line. <em>since | |||||
<td>suppress all messages. This is the same as <kbd>-Q</kbd> on the command line. <em>since | |||||
Ant 1.6</em>.</td> | Ant 1.6</em>.</td> | ||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
@@ -181,9 +181,9 @@ the <var>cvsRoot</var> attribute, and stores the files in <samp>${ws.dir}</samp> | |||||
<pre><cvs command="-q diff -u -N" output="patch.txt"/></pre> | <pre><cvs command="-q diff -u -N" output="patch.txt"/></pre> | ||||
<p>silently (<code>-q</code>) creates a file called <samp>patch.txt</samp> which contains a unified | |||||
(<code>-u</code>) diff which includes new files added via <code>cvs add</code> (<code>-N</code>) and | |||||
can be used as input to <code>patch</code>. The equivalent, using <code><commandline></code> | |||||
<p>silently (<kbd>-q</kbd>) creates a file called <samp>patch.txt</samp> which contains a unified | |||||
(<kbd>-u</kbd>) diff which includes new files added via <kbd>cvs add</kbd> (<kbd>-N</kbd>) and | |||||
can be used as input to <kbd>patch</kbd>. The equivalent, using <code><commandline></code> | |||||
elements, is:</p> | elements, is:</p> | ||||
<pre> | <pre> | ||||
<cvs output="patch"> | <cvs output="patch"> | ||||
@@ -206,9 +206,9 @@ the <var>failonerror</var>, <var>compression</var>, and other "global" | |||||
the <code><cvs></code> element.</p> | the <code><cvs></code> element.</p> | ||||
<pre> <cvs command="update -A -d"/></pre> | <pre> <cvs command="update -A -d"/></pre> | ||||
<p>Updates from the head of repository ignoring sticky bits (<code>-A</code>) and creating any new | |||||
directories as necessary (<code>-d</code>).</p> | |||||
<p>Note: the text of the command is passed to <code>cvs</code> "as-is" so any cvs options | |||||
<p>Updates from the head of repository ignoring sticky bits (<kbd>-A</kbd>) and creating any new | |||||
directories as necessary (<kbd>-d</kbd>).</p> | |||||
<p>Note: the text of the command is passed to <kbd>cvs</kbd> "as-is" so any cvs options | |||||
should appear before the command, and any command options should appear after the command as in the | should appear before the command, and any command options should appear after the command as in the | ||||
diff example above. See <a href="http://cvsbook.red-bean.com/cvsbook.html" target="_top">the CVS | diff example above. See <a href="http://cvsbook.red-bean.com/cvsbook.html" target="_top">the CVS | ||||
book</a> for details, specifically | book</a> for details, specifically | ||||
@@ -27,7 +27,7 @@ | |||||
<h2 id="cvs">cvspass</h2> | <h2 id="cvs">cvspass</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Adds entries to a <samp>.cvspass</samp> file. Adding entries to this file has the same affect as | <p>Adds entries to a <samp>.cvspass</samp> file. Adding entries to this file has the same affect as | ||||
a <code>cvs login</code> command.</p> | |||||
a <kbd>cvs login</kbd> command.</p> | |||||
<p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If | <p><strong>CVSNT Note</strong>: CVSNT prefers users to store the passwords inside the registry. If | ||||
the task doesn't seem to work for you, the most likely reason is that CVSNT ignores | the task doesn't seem to work for you, the most likely reason is that CVSNT ignores | ||||
@@ -25,10 +25,10 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Generates an XML-formatted report file of the changes between two tags or dates recorded in | <p>Generates an XML-formatted report file of the changes between two tags or dates recorded in | ||||
a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p> | a <a href="https://www.nongnu.org/cvs/" target="_top">CVS</a> repository.</p> | ||||
<p><strong>Important</strong>: This task needs <code>cvs</code> on the path. If it isn't, you will | |||||
get an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, | |||||
try to execute <code>cvs.exe</code> from the command line in the target directory in which you are | |||||
working. Also note that this task assumes that the cvs executable is compatible with the Unix | |||||
<p><strong>Important</strong>: This task needs <kbd>cvs</kbd> on the path. If it isn't, you will get | |||||
an error (such as <code>error=2</code> on Windows). If <code><cvs></code> doesn't work, try to | |||||
execute <kbd>cvs.exe</kbd> from the command line in the target directory in which you are working. | |||||
Also note that this task assumes that the <kbd>cvs</kbd> executable is compatible with the Unix | |||||
version, this is not completely true for certain other CVS clients—like CVSNT for | version, this is not completely true for certain other CVS clients—like CVSNT for | ||||
example—and some operation may fail when using such an incompatible client.</p> | example—and some operation may fail when using such an incompatible client.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -46,8 +46,8 @@ example—and some operation may fail when using such an incompatible client | |||||
<tr> | <tr> | ||||
<td>startDate</td> | <td>startDate</td> | ||||
<td class="left">The earliest date from which diffs are to be included in the | <td class="left">The earliest date from which diffs are to be included in the | ||||
report.<br/>Accepts all formats accepted by the <code>cvs</code> command for <code>-D | |||||
date_spec</code> arguments.</td> | |||||
report.<br/>Accepts all formats accepted by the <kbd>cvs</kbd> command for <kbd>-D | |||||
date_spec</kbd> arguments.</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>endTag</td> | <td>endTag</td> | ||||
@@ -57,7 +57,7 @@ example—and some operation may fail when using such an incompatible client | |||||
<tr> | <tr> | ||||
<td>endDate</td> | <td>endDate</td> | ||||
<td class="left">The latest date from which diffs are to be included in the report.<br/>Accepts | <td class="left">The latest date from which diffs are to be included in the report.<br/>Accepts | ||||
all formats accepted by the <code>cvs</code> command for <code>-D date_spec</code> | |||||
all formats accepted by the <kbd>cvs</kbd> command for <kbd>-D date_spec</kbd> | |||||
arguments.</td> | arguments.</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -82,7 +82,7 @@ example—and some operation may fail when using such an incompatible client | |||||
<tr> | <tr> | ||||
<td>compression</td> | <td>compression</td> | ||||
<td><q>true</q> (equivalent to <q>3</q>), <q>false</q>, or a number between <q>1</q> | <td><q>true</q> (equivalent to <q>3</q>), <q>false</q>, or a number between <q>1</q> | ||||
and <q>9</q> (corresponding to possible values for CVS <code>-z#</code> argument). Any other | |||||
and <q>9</q> (corresponding to possible values for CVS <kbd>-z#</kbd> argument). Any other | |||||
value is treated as <q>false</q></td> | value is treated as <q>false</q></td> | ||||
<td>No; defaults to no compression</td> | <td>No; defaults to no compression</td> | ||||
</tr> | </tr> | ||||
@@ -77,10 +77,10 @@ nested <code><fileset></code>.</p> | |||||
<tr> | <tr> | ||||
<td>quiet</td> | <td>quiet</td> | ||||
<td>If the specified file or directory does not exist, do not display a diagnostic message | <td>If the specified file or directory does not exist, do not display a diagnostic message | ||||
(unless Apache Ant has been invoked with the <code>-verbose</code> or <code>-debug</code> | |||||
(unless Apache Ant has been invoked with the <kbd>-verbose</kbd> or <kbd>-debug</kbd> | |||||
switches) or modify the exit status to reflect an error. When set to <q>true</q>, if a file | switches) or modify the exit status to reflect an error. When set to <q>true</q>, if a file | ||||
or directory cannot be deleted, no error is reported. This setting emulates | or directory cannot be deleted, no error is reported. This setting emulates | ||||
the <code>-f</code> option to the Unix <em>rm</em> command. Setting this to <q>true</q> | |||||
the <kbd>-f</kbd> option to the Unix <em>rm</em> command. Setting this to <q>true</q> | |||||
implies setting <var>failonerror</var> to <q>false</q>.</td> | implies setting <var>failonerror</var> to <q>false</q>.</td> | ||||
<td>No; default <q>false</q></td> | <td>No; default <q>false</q></td> | ||||
</tr> | </tr> | ||||
@@ -152,7 +152,7 @@ public final class Constants { | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>warnOnRmiStubs</td> | <td>warnOnRmiStubs</td> | ||||
<td>Flag to disable warnings about files that look like <code>rmic</code> generated | |||||
<td>Flag to disable warnings about files that look like <kbd>rmic</kbd> generated | |||||
stub/skeleton classes and have no <samp>.java</samp> source. Useful when doing RMI | stub/skeleton classes and have no <samp>.java</samp> source. Useful when doing RMI | ||||
development.</td> | development.</td> | ||||
<td>No; default <q>true</q></td> | <td>No; default <q>true</q></td> | ||||
@@ -27,7 +27,7 @@ | |||||
<h2 id="diagnostics">Diagnostics</h2> | <h2 id="diagnostics">Diagnostics</h2> | ||||
<p><em>Since Ant 1.7.0</em></p> | <p><em>Since Ant 1.7.0</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Runs Apache Ant's <code>-diagnostics</code> code inside Ant itself. This is good for debugging | |||||
<p>Runs Apache Ant's <kbd>-diagnostics</kbd> code inside Ant itself. This is good for debugging | |||||
Ant's configuration under an IDE.</p> | Ant's configuration under an IDE.</p> | ||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
@@ -100,12 +100,12 @@ parsers.<br/>See <a href="https://www.w3.org/TR/xml/#sec-line-ends" target="_top | |||||
26 November 2008 / End of Line handling</a> for more details.</p> | 26 November 2008 / End of Line handling</a> for more details.</p> | ||||
<pre><echo message="Deleting drive C:" level="debug"/></pre> | <pre><echo message="Deleting drive C:" level="debug"/></pre> | ||||
<p>A message which only appears in <code>-debug</code> mode.</p> | |||||
<p>A message which only appears in <kbd>-debug</kbd> mode.</p> | |||||
<pre><echo level="error"> | <pre><echo level="error"> | ||||
Imminent failure in the antimatter containment facility. | Imminent failure in the antimatter containment facility. | ||||
Please withdraw to safe location at least 50km away. | Please withdraw to safe location at least 50km away. | ||||
</echo></pre> | </echo></pre> | ||||
<p>A message which appears even in <code>-quiet</code> mode.</p> | |||||
<p>A message which appears even in <kbd>-quiet</kbd> mode.</p> | |||||
<pre><echo file="runner.csh" append="false">#\!/bin/tcsh | <pre><echo file="runner.csh" append="false">#\!/bin/tcsh | ||||
java-1.3.1 -mx1024m ${project.entrypoint} $$* | java-1.3.1 -mx1024m ${project.entrypoint} $$* | ||||
@@ -117,10 +117,10 @@ Ant filtering out the single <q>$</q> during variable expansion.</p> | |||||
<table> | <table> | ||||
<tr> | <tr> | ||||
<th>Ant command line</th> | <th>Ant command line</th> | ||||
<th><code>-quiet</code>, <code>-q</code></th> | |||||
<th><kbd>-quiet</kbd>, <kbd>-q</kbd></th> | |||||
<th><em>no switch</em></th> | <th><em>no switch</em></th> | ||||
<th><code>-verbose</code>, <code>-v</code></th> | |||||
<th><code>-debug</code>, <code>-d</code></th> | |||||
<th><kbd>-verbose</kbd>, <kbd>-v</kbd></th> | |||||
<th><kbd>-debug</kbd>, <kbd>-d</kbd></th> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td><pre><echo message="This is error message." level="error"/></pre></td> | <td><pre><echo message="This is error message." level="error"/></pre></td> | ||||
@@ -30,7 +30,7 @@ | |||||
<p>Displays all the current properties (or a subset of them specified by a | <p>Displays all the current properties (or a subset of them specified by a | ||||
nested <code><propertyset></code>) in the project. The output can be sent to a file if | nested <code><propertyset></code>) in the project. The output can be sent to a file if | ||||
desired. This task can be used as a somewhat contrived means of returning data from an | desired. This task can be used as a somewhat contrived means of returning data from an | ||||
<code>ant</code> invocation, but is really for debugging build | |||||
<kbd>ant</kbd> invocation, but is really for debugging build | |||||
files.</p> | files.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -62,9 +62,9 @@ files.</p> | |||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>If an error occurs while writing the properties to a file, and this attribute is enabled, | <td>If an error occurs while writing the properties to a file, and this attribute is enabled, | ||||
then a BuildException will be thrown, causing the build to fail. If disabled, then IO errors | |||||
will be reported as a log statement, and the build will continue without failure from this | |||||
task.</td> | |||||
then a <code>BuildException</code> will be thrown, causing the build to fail. If disabled, | |||||
then IO errors will be reported as a log statement, and the build will continue without | |||||
failure from this task.</td> | |||||
<td>No; default is <q>true</q></td> | <td>No; default is <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -136,7 +136,7 @@ mechanisms.</p> | |||||
<hr/> | <hr/> | ||||
<h2 id="ejbc">ejbc</h2> | <h2 id="ejbc">ejbc</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>The <code>ejbc</code> task will run WebLogic's <code>ejbc</code> tool. This tool will take a | |||||
<p>The <code>ejbc</code> task will run WebLogic's <kbd>ejbc</kbd> tool. This tool will take a | |||||
serialized deployment descriptor, examine the various EJB interfaces and bean classes and then | serialized deployment descriptor, examine the various EJB interfaces and bean classes and then | ||||
generate the required support classes necessary to deploy the bean in a WebLogic EJB container. This | generate the required support classes necessary to deploy the bean in a WebLogic EJB container. This | ||||
will include the RMI stubs and skeletons as well as the classes which implement the bean's home and | will include the RMI stubs and skeletons as well as the classes which implement the bean's home and | ||||
@@ -150,7 +150,7 @@ to be regenerated. The deployment descriptor is de-serialized to discover the ho | |||||
implementation classes. The corresponding source files are determined and checked to see their | implementation classes. The corresponding source files are determined and checked to see their | ||||
modification times. These times and the modification time of the serialized descriptor itself are | modification times. These times and the modification time of the serialized descriptor itself are | ||||
compared with the modification time of the generated classes. If the generated classes are not | compared with the modification time of the generated classes. If the generated classes are not | ||||
present or are out of date, the <code>ejbc</code> tool is run to generate new versions.</p> | |||||
present or are out of date, the <kbd>ejbc</kbd> tool is run to generate new versions.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -189,7 +189,7 @@ present or are out of date, the <code>ejbc</code> tool is run to generate new ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>keepgenerated</td> | <td>keepgenerated</td> | ||||
<td>Controls whether <code>ejbc</code> will keep the intermediate java files used to build the | |||||
<td>Controls whether <kbd>ejbc</kbd> will keep the intermediate java files used to build the | |||||
class files. This can be useful when debugging.</td> | class files. This can be useful when debugging.</td> | ||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
@@ -216,7 +216,7 @@ EJBs, this is a convenient way of specifying many EJBs in a single Ant task.</p> | |||||
destination directory. If these class files cannot be located in the destination directory, the | destination directory. If these class files cannot be located in the destination directory, the | ||||
task will fail. The task will also attempt to locate the EJB stubs and skeletons in this directory. | task will fail. The task will also attempt to locate the EJB stubs and skeletons in this directory. | ||||
If found, the timestamps on the stubs and skeletons will be checked to ensure they are up to | If found, the timestamps on the stubs and skeletons will be checked to ensure they are up to | ||||
date. Only if these files cannot be found or if they are out of date will the iAS <code>ejbc</code> | |||||
date. Only if these files cannot be found or if they are out of date will the iAS <kbd>ejbc</kbd> | |||||
utility be called to generate new stubs and skeletons.</p> | utility be called to generate new stubs and skeletons.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -256,14 +256,14 @@ utility be called to generate new stubs and skeletons.</p> | |||||
<tr> | <tr> | ||||
<td>keepgenerated</td> | <td>keepgenerated</td> | ||||
<td>Indicates whether or not the Java source files which are generated by <code>ejbc</code> will | |||||
<td>Indicates whether or not the Java source files which are generated by <kbd>ejbc</kbd> will | |||||
be saved or automatically deleted. If <q>yes</q>, the source files will be retained.</td> | be saved or automatically deleted. If <q>yes</q>, the source files will be retained.</td> | ||||
<td>No; defaults to <q>no</q></td> | <td>No; defaults to <q>no</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>debug</td> | <td>debug</td> | ||||
<td>Indicates whether or not the <code>ejbc</code> utility should log additional debugging | |||||
<td>Indicates whether or not the <kbd>ejbc</kbd> utility should log additional debugging | |||||
statements to the standard output. If <q>yes</q>, the additional debugging statements will be | statements to the standard output. If <q>yes</q>, the additional debugging statements will be | ||||
generated.</td> | generated.</td> | ||||
<td>No; defaults to <q>no</q></td> | <td>No; defaults to <q>no</q></td> | ||||
@@ -272,9 +272,9 @@ utility be called to generate new stubs and skeletons.</p> | |||||
<tr> | <tr> | ||||
<td>iashome</td> | <td>iashome</td> | ||||
<td>May be used to specify the "home" directory for this iAS installation. This is used to find | <td>May be used to specify the "home" directory for this iAS installation. This is used to find | ||||
the <code>ejbc</code> utility if it isn't included in the user's system path. If specified, it | |||||
the <kbd>ejbc</kbd> utility if it isn't included in the user's system path. If specified, it | |||||
should refer to the <samp>[install-location]/iplanet/ias6/ias</samp> directory.</td> | should refer to the <samp>[install-location]/iplanet/ias6/ias</samp> directory.</td> | ||||
<td>No; by default the <code>ejbc</code> utility must be on the user's system path</td> | |||||
<td>No; by default the <kbd>ejbc</kbd> utility must be on the user's system path</td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -820,7 +820,7 @@ skeletons.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>keepgeneric</td> | <td>keepgeneric</td> | ||||
<td>This controls whether the generic file used as input to <code>ejbc</code> is retained.</td> | |||||
<td>This controls whether the generic file used as input to <kbd>ejbc</kbd> is retained.</td> | |||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -877,9 +877,9 @@ as <samp>META-INF/Customer-weblogic-cmp-rdbms-jar.xml</samp>.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>classpath</td> | <td>classpath</td> | ||||
<td>The classpath to be used when running the WebLogic <code>ejbc</code> tool. Note that this | |||||
<td>The classpath to be used when running the WebLogic <kbd>ejbc</kbd> tool. Note that this | |||||
tool typically requires the classes that make up the bean to be available on the classpath. | tool typically requires the classes that make up the bean to be available on the classpath. | ||||
Currently, however, this will cause the <code>ejbc</code> tool to be run in a separate | |||||
Currently, however, this will cause the <kbd>ejbc</kbd> tool to be run in a separate | |||||
JVM</td> | JVM</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -893,7 +893,7 @@ as <samp>META-INF/Customer-weblogic-cmp-rdbms-jar.xml</samp>.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>keepgeneric</td> | <td>keepgeneric</td> | ||||
<td>This controls whether the generic file used as input to <code>ejbc</code> is retained.</td> | |||||
<td>This controls whether the generic file used as input to <kbd>ejbc</kbd> is retained.</td> | |||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -910,7 +910,7 @@ as <samp>META-INF/Customer-weblogic-cmp-rdbms-jar.xml</samp>.</p> | |||||
<td>This flag controls whether <code>weblogic.ejbc</code> is always invoked to build the jar | <td>This flag controls whether <code>weblogic.ejbc</code> is always invoked to build the jar | ||||
file. In certain circumstances, such as when only a bean class has been changed, the jar can | file. In certain circumstances, such as when only a bean class has been changed, the jar can | ||||
be generated by merely replacing the changed classes and not | be generated by merely replacing the changed classes and not | ||||
rerunning <code>ejbc</code>. Setting this to <q>false</q> will reduce the time to | |||||
rerunning <kbd>ejbc</kbd>. Setting this to <q>false</q> will reduce the time to | |||||
run <code>ejbjar</code>.</td> | run <code>ejbjar</code>.</td> | ||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
@@ -962,13 +962,13 @@ as <samp>META-INF/Customer-weblogic-cmp-rdbms-jar.xml</samp>.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>noEJBC</td> | <td>noEJBC</td> | ||||
<td>If this attribute is set to <q>true</q>, WebLogic's <code>ejbc</code> will not be run on the | |||||
EJB jar. Use this if you prefer to run <code>ejbc</code> at deployment time.</td> | |||||
<td>If this attribute is set to <q>true</q>, WebLogic's <kbd>ejbc</kbd> will not be run on the | |||||
EJB jar. Use this if you prefer to run <kbd>ejbc</kbd> at deployment time.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ejbcclass</td> | <td>ejbcclass</td> | ||||
<td>Specifies the classname of the <code>ejbc</code> compiler. Normally <code>ejbjar</code> | |||||
<td>Specifies the classname of the <kbd>ejbc</kbd> compiler. Normally <code>ejbjar</code> | |||||
determines the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler | determines the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler | ||||
featured in WebLogic 6 has, however, been deprecated in version 7. When using with version 7 | featured in WebLogic 6 has, however, been deprecated in version 7. When using with version 7 | ||||
this attribute should be set to <q>weblogic.ejbc</q> to avoid the deprecation warning.</td> | this attribute should be set to <q>weblogic.ejbc</q> to avoid the deprecation warning.</td> | ||||
@@ -984,14 +984,14 @@ as <samp>META-INF/Customer-weblogic-cmp-rdbms-jar.xml</samp>.</p> | |||||
<tr> | <tr> | ||||
<td>jvmdebuglevel</td> | <td>jvmdebuglevel</td> | ||||
<td>Sets the <code>weblogic.StdoutSeverityLevel</code> to use when running the JVM that | <td>Sets the <code>weblogic.StdoutSeverityLevel</code> to use when running the JVM that | ||||
executes <code>ejbc</code>. Set to <q>16</q> to avoid the warnings about EJB Home and Remotes | |||||
executes <kbd>ejbc</kbd>. Set to <q>16</q> to avoid the warnings about EJB Home and Remotes | |||||
being in the classpath</td> | being in the classpath</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>outputdir</td> | <td>outputdir</td> | ||||
<td>If set <code>ejbc</code> will be given this directory as the output destination rather than | |||||
a jar file. This allows for the generation of "exploded" jars.</td> | |||||
<td>If set <kbd>ejbc</kbd> will be given this directory as the output destination rather than a | |||||
jar file. This allows for the generation of "exploded" jars.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -1145,15 +1145,15 @@ adds them to the final EJB jar file. WebSphere has two specific descriptors for | |||||
</ul> | </ul> | ||||
<p>In terms of WebSphere, the generation of container code and stubs is called <em>deployment</em>. | <p>In terms of WebSphere, the generation of container code and stubs is called <em>deployment</em>. | ||||
This step can be performed by the <code>websphere</code> element as part of the jar generation | This step can be performed by the <code>websphere</code> element as part of the jar generation | ||||
process. If the switch <var>ejbdeploy</var> is on, the <code>ejbdeploy</code> tool from the | |||||
process. If the switch <var>ejbdeploy</var> is on, the <kbd>ejbdeploy</kbd> tool from the | |||||
WebSphere toolset is called for every EJB jar. Unfortunately, this step only works, if you use the | WebSphere toolset is called for every EJB jar. Unfortunately, this step only works, if you use the | ||||
IBM JDK. Otherwise, the <code>rmic</code> (called by <code>ejbdeploy</code>) throws | |||||
IBM JDK. Otherwise, the <kbd>rmic</kbd> (called by <kbd>ejbdeploy</kbd>) throws | |||||
a <code>ClassFormatError</code>. Be sure to switch <var>ejbdeploy</var> off, if Ant runs with Oracle | a <code>ClassFormatError</code>. Be sure to switch <var>ejbdeploy</var> off, if Ant runs with Oracle | ||||
JDK or OpenJDK.</p> | JDK or OpenJDK.</p> | ||||
<p>For the <code>websphere</code> element to work, you have to provide a complete classpath, that | <p>For the <code>websphere</code> element to work, you have to provide a complete classpath, that | ||||
contains all classes, that are required to reflect the bean classes. For <code>ejbdeploy</code> to | |||||
work, you must also provide the classpath of the <code>ejbdeploy</code> tool and set | |||||
contains all classes, that are required to reflect the bean classes. For <kbd>ejbdeploy</kbd> to | |||||
work, you must also provide the classpath of the <kbd>ejbdeploy</kbd> tool and set | |||||
the <code>websphere.home</code> property (look at the examples below).</p> | the <code>websphere.home</code> property (look at the examples below).</p> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -1171,8 +1171,8 @@ the <code>websphere.home</code> property (look at the examples below).</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ejbdeploy</td> | <td>ejbdeploy</td> | ||||
<td>Decides whether <code>ejbdeploy</code> is called. When you set this to <q>true</q>, be | |||||
sure, to run Ant with the IBM JDK.</td> | |||||
<td>Decides whether <kbd>ejbdeploy</kbd> is called. When you set this to <q>true</q>, be sure | |||||
to run Ant with the IBM JDK.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -1183,44 +1183,43 @@ the <code>websphere.home</code> property (look at the examples below).</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>keepgeneric</td> | <td>keepgeneric</td> | ||||
<td>This controls whether the generic file used as input to <code>ejbdeploy</code> is | |||||
<td>This controls whether the generic file used as input to <kbd>ejbdeploy</kbd> is | |||||
retained.</td> | retained.</td> | ||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>rebuild</td> | <td>rebuild</td> | ||||
<td>This controls whether <code>ejbdeploy</code> is called although no changes have | |||||
occurred.</td> | |||||
<td>This controls whether <kbd>ejbdeploy</kbd> is called although no changes have occurred.</td> | |||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>tempdir</td> | <td>tempdir</td> | ||||
<td>A directory, where <code>ejbdeploy</code> will write temporary files</td> | |||||
<td>A directory, where <kbd>ejbdeploy</kbd> will write temporary files</td> | |||||
<td>No; defaults to <q>_ejbdeploy_temp</q></td> | <td>No; defaults to <q>_ejbdeploy_temp</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>dbName<br/>dbSchema</td> | <td>dbName<br/>dbSchema</td> | ||||
<td>These options are passed to <code>ejbdeploy</code>.</td> | |||||
<td>These options are passed to <kbd>ejbdeploy</kbd>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>dbVendor</td> | <td>dbVendor</td> | ||||
<td>This option is passed to <code>ejbdeploy</code>. Valid options can be obtained by running | |||||
the following command: <pre><WAS_HOME>/bin/EJBDeploy.[sh/bat] -help</pre> This is also | |||||
used to determine the name of the <code>Map.mapxmi</code> and <code>Schema.dbxmi</code> files, | |||||
for example <samp>Account-DB2UDBWIN_V71-Map.mapxmi</samp> | |||||
<td>This option is passed to <kbd>ejbdeploy</kbd>. Valid options can be obtained by running the | |||||
following command: <pre><WAS_HOME>/bin/EJBDeploy.[sh/bat] -help</pre> This is also used | |||||
to determine the name of the <code>Map.mapxmi</code> and <code>Schema.dbxmi</code> files, for | |||||
example <samp>Account-DB2UDBWIN_V71-Map.mapxmi</samp> | |||||
and <samp>Account-DB2UDBWIN_V71-Schema.dbxmi</samp>.</td> | and <samp>Account-DB2UDBWIN_V71-Schema.dbxmi</samp>.</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>codegen<br/>quiet<br/>novalidate<br/>noinform<br/>trace<br/>use35MappingRules</td> | <td>codegen<br/>quiet<br/>novalidate<br/>noinform<br/>trace<br/>use35MappingRules</td> | ||||
<td>These options are all passed to <code>ejbdeploy</code>.</td> | |||||
<td>These options are all passed to <kbd>ejbdeploy</kbd>.</td> | |||||
<td>No; default is <q>false</q> (except for <var>quiet</var>)</td> | <td>No; default is <q>false</q> (except for <var>quiet</var>)</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>rmicOptions</td> | <td>rmicOptions</td> | ||||
<td>This option is passed to <code>ejbdeploy</code> and will be passed on | |||||
to <code>rmic</code>.</td> | |||||
<td>This option is passed to <kbd>ejbdeploy</kbd> and will be passed on | |||||
to <kbd>rmic</kbd>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -1300,14 +1299,14 @@ example, <var>suffix</var>). Refer to the appropriate documentation for more de | |||||
<tr> | <tr> | ||||
<td>keepgenerated</td> | <td>keepgenerated</td> | ||||
<td>Indicates whether or not the Java source files which are generated by <code>ejbc</code> will | |||||
<td>Indicates whether or not the Java source files which are generated by <kbd>ejbc</kbd> will | |||||
be saved or automatically deleted. If <q>yes</q>, the source files will be retained.</td> | be saved or automatically deleted. If <q>yes</q>, the source files will be retained.</td> | ||||
<td>No; defaults to <q>no</q></td> | <td>No; defaults to <q>no</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>debug</td> | <td>debug</td> | ||||
<td>Indicates whether or not the <code>ejbc</code> utility should log additional debugging | |||||
<td>Indicates whether or not the <kbd>ejbc</kbd> utility should log additional debugging | |||||
statements to the standard output. If <q>yes</q>, the additional debugging statements will be | statements to the standard output. If <q>yes</q>, the additional debugging statements will be | ||||
generated.</td> | generated.</td> | ||||
<td>No; defaults to <q>no</q></td> | <td>No; defaults to <q>no</q></td> | ||||
@@ -1316,9 +1315,9 @@ example, <var>suffix</var>). Refer to the appropriate documentation for more de | |||||
<tr> | <tr> | ||||
<td>iashome</td> | <td>iashome</td> | ||||
<td>May be used to specify the "home" directory for this iAS installation. This is used to find | <td>May be used to specify the "home" directory for this iAS installation. This is used to find | ||||
the <code>ejbc</code> utility if it isn't included in the user's system path. If specified, | |||||
it should refer to the <samp>[install-location]/iplanet/ias6/ias</samp> directory.</td> | |||||
<td>No; by default, the <code>ejbc</code> utility must be on the user's system path.</td> | |||||
the <kbd>ejbc</kbd> utility if it isn't included in the user's system path. If specified, it | |||||
should refer to the <samp>[install-location]/iplanet/ias6/ias</samp> directory.</td> | |||||
<td>No; by default, the <kbd>ejbc</kbd> utility must be on the user's system path.</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -1497,7 +1496,7 @@ example, <var>suffix</var>). Refer to the appropriate documentation for more det | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>verbose</td> | <td>verbose</td> | ||||
<td>Indicates whether or not to use <code>-verbose</code> switch.</td> | |||||
<td>Indicates whether or not to use <kbd>-verbose</kbd> switch.</td> | |||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -52,7 +52,7 @@ exact semantics of the call. In particular, if you do not put a file extension o | |||||
only <samp>.EXE</samp> files are looked for, not <samp>.COM</samp>, <samp>.CMD</samp> or other file | only <samp>.EXE</samp> files are looked for, not <samp>.COM</samp>, <samp>.CMD</samp> or other file | ||||
types listed in the environment variable <code>PATHEXT</code>. That is only used by the shell.</p> | types listed in the environment variable <code>PATHEXT</code>. That is only used by the shell.</p> | ||||
<p>Note that <samp>.bat</samp> files cannot in general by executed directly. One normally needs to | <p>Note that <samp>.bat</samp> files cannot in general by executed directly. One normally needs to | ||||
execute the command shell executable <code>cmd</code> using the <code>/c</code> switch.</p> | |||||
execute the command shell executable <kbd>cmd</kbd> using the <kbd>/c</kbd> switch.</p> | |||||
<pre> | <pre> | ||||
<target name="help"> | <target name="help"> | ||||
<exec executable="cmd"> | <exec executable="cmd"> | ||||
@@ -62,24 +62,25 @@ execute the command shell executable <code>cmd</code> using the <code>/c</code> | |||||
</exec> | </exec> | ||||
</target></pre> | </target></pre> | ||||
<p>A common problem is not having the executable on the PATH. In case you get an error | |||||
message <code>Cannot run program "...":CreateProcess error=2. The system cannot find the path | |||||
specified.</code> have a look at your <code>PATH</code> variable. Just type the command directly on | |||||
the command line and if Windows finds it, Ant should do it too. (Otherwise ask on the user | |||||
mailinglist for help.) If Windows can not execute the program add the directory of the program to | |||||
the <code>PATH</code> (<code>set PATH=%PATH%;dirOfProgram</code>) or specify the absolute path in | |||||
the <var>executable</var> attribute in your buildfile.</p> | |||||
<p>A common problem is not having the executable on the <code>PATH</code>code>. In case you get an | |||||
error message <code class="output">Cannot run program "...":CreateProcess error=2. The system cannot | |||||
find the path specified.</code> have a look at your <code>PATH</code> variable. Just type the | |||||
command directly on the command line and if Windows finds it, Ant should do it too. (Otherwise ask | |||||
on the user mailinglist for help.) If Windows can not execute the program, add the directory of the | |||||
program to the <code>PATH</code> (<code>set PATH=%PATH%;dirOfProgram</code>) or specify the absolute | |||||
path in the <var>executable</var> attribute in your buildfile.</p> | |||||
<h4>Cygwin Users</h4> | <h4>Cygwin Users</h4> | ||||
<p>The <code><exec></code> task will not understand paths such as <code>/bin/sh</code> for the | |||||
executable parameter. This is because JVM in which Ant is running is a standard Windows executable | |||||
and is not aware of the Cygwin environment (i.e., doesn't load <samp>cygwin1.dll</samp>). The only | |||||
work-around for this is to compile a JVM under Cygwin (at your own risk). See for | |||||
<p>The <code><exec></code> task will not understand paths such as <q>/bin/sh</q> for | |||||
the <var>executable</var> parameter. This is because JVM in which Ant is running is a standard | |||||
Windows executable and is not aware of the Cygwin environment (i.e., doesn't | |||||
load <samp>cygwin1.dll</samp>). The only work-around for this is to compile a JVM under Cygwin (at | |||||
your own risk). See for | |||||
instance <a href="https://cdn.rawgit.com/AdoptOpenJDK/openjdk-jdk9/dev/common/doc/building.html#cygwin" | instance <a href="https://cdn.rawgit.com/AdoptOpenJDK/openjdk-jdk9/dev/common/doc/building.html#cygwin" | ||||
target="_top">OpenJDK build instructions for cygwin</a>.</p> | target="_top">OpenJDK build instructions for cygwin</a>.</p> | ||||
<h4>OpenVMS Users</h4> | <h4>OpenVMS Users</h4> | ||||
<p>The command specified using <code>executable</code> and <code><arg></code> elements is | |||||
<p>The command specified using <var>executable</var> and <code><arg></code> elements is | |||||
executed exactly as specified inside a temporary DCL script. This has some implications:</p> | executed exactly as specified inside a temporary DCL script. This has some implications:</p> | ||||
<ul> | <ul> | ||||
<li>paths have to be written in VMS style</li> | <li>paths have to be written in VMS style</li> | ||||
@@ -93,7 +94,7 @@ to <code>TRUE</code> in the job table (see the <em>JDK Release Notes</em>).</p> | |||||
<p>Please note that JVM provided by HP doesn't follow OpenVMS' conventions of exit codes. If you | <p>Please note that JVM provided by HP doesn't follow OpenVMS' conventions of exit codes. If you | ||||
run a JVM with this task, the task may falsely claim that an error occurred (or silently ignore an | run a JVM with this task, the task may falsely claim that an error occurred (or silently ignore an | ||||
error). Don't use this task to run <code>JAVA.EXE</code>, use a <code><java></code> task with | |||||
error). Don't use this task to run <kbd>JAVA.EXE</kbd>, use a <code><java></code> task with | |||||
the <var>fork</var> attribute set to <q>true</q> instead as this task will follow the JVM's | the <var>fork</var> attribute set to <q>true</q> instead as this task will follow the JVM's | ||||
interpretation of exit codes.</p> | interpretation of exit codes.</p> | ||||
@@ -104,13 +105,13 @@ their interpreter specified, i.e., the scripts must start with something like:</ | |||||
<pre>#!/bin/bash</pre> | <pre>#!/bin/bash</pre> | ||||
<p>or the task will fail as follows:</p> | <p>or the task will fail as follows:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
[exec] Warning: UNIXProcess.forkAndExec native error: Exec format error | [exec] Warning: UNIXProcess.forkAndExec native error: Exec format error | ||||
[exec] Result: 255</pre> | [exec] Result: 255</pre> | ||||
<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> | <h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> | ||||
<p>If you run Ant as a background process (like <code>ant &</code>) and use | |||||
<p>If you run Ant as a background process (like <kbd>ant &</kbd>) and use | |||||
the <code><exec></code> task with <var>spawn</var> set to <q>false</q>, you must provide | the <code><exec></code> task with <var>spawn</var> set to <q>false</q>, you must provide | ||||
explicit input to the forked process or Ant will be suspended because it tries to read from the | explicit input to the forked process or Ant will be suspended because it tries to read from the | ||||
standard input.</p> | standard input.</p> | ||||
@@ -240,7 +241,7 @@ standard input.</p> | |||||
<tr> | <tr> | ||||
<td>vmlauncher</td> | <td>vmlauncher</td> | ||||
<td>Run command using the JVM's execution facilities where available. If set to <q>false</q> the | <td>Run command using the JVM's execution facilities where available. If set to <q>false</q> the | ||||
underlying OS's shell, either directly or through the <code>antRun</code> scripts, will be | |||||
underlying OS's shell, either directly or through the <kbd>antRun</kbd> scripts, will be | |||||
used. Under some operating systems, this gives access to facilities not normally available | used. Under some operating systems, this gives access to facilities not normally available | ||||
through JVM including, under Windows, being able to execute scripts, rather than their | through JVM including, under Windows, being able to execute scripts, rather than their | ||||
associated interpreter. If you want to specify the name of the executable as a relative path | associated interpreter. If you want to specify the name of the executable as a relative path | ||||
@@ -369,14 +370,15 @@ process. The browser will remain.</p> | |||||
</exec> | </exec> | ||||
</pre> | </pre> | ||||
<p>Sends the string <q>blah before blah</q> to the <code>cat</code> executable, using | |||||
<p>Sends the string <q>blah before blah</q> to the <kbd>cat</kbd> executable, using | |||||
an <a href="../Types/filterchain.html"><inputfilterchain></a> to replace <q>before</q> | an <a href="../Types/filterchain.html"><inputfilterchain></a> to replace <q>before</q> | ||||
with <q>after</q> on the way in. Output is sent to the file <samp>redirector.out</samp> and stored | with <q>after</q> on the way in. Output is sent to the file <samp>redirector.out</samp> and stored | ||||
in a property of the same name. Similarly, error output is sent to a file and a property, both | in a property of the same name. Similarly, error output is sent to a file and a property, both | ||||
named <samp>redirector.err</samp>.</p> | named <samp>redirector.err</samp>.</p> | ||||
<p><strong>Note</strong>: do not try to specify arguments using a simple arg-element and separate | |||||
them by spaces. This results in only a single argument containing the entire string.</p> | |||||
<p><strong>Note</strong>: do not try to specify arguments using a simple <code>arg</code>-element | |||||
and separate them by spaces. This results in only a single argument containing the entire | |||||
string.</p> | |||||
<p><strong>Timeouts</strong>: If a timeout is specified, when it is reached the sub process is | <p><strong>Timeouts</strong>: If a timeout is specified, when it is reached the sub process is | ||||
killed and a message printed to the log. The return value of the execution will be <q>-1</q>, which | killed and a message printed to the log. The return value of the execution will be <q>-1</q>, which | ||||
will halt the build if <var>failonerror</var>=<q>true</q>, but be ignored otherwise.</p> | will halt the build if <var>failonerror</var>=<q>true</q>, but be ignored otherwise.</p> | ||||
@@ -75,7 +75,7 @@ see <a href="conditions.html">here</a>.<br/><em>Since Ant 1.6.2</em> | |||||
<pre><fail/></pre> | <pre><fail/></pre> | ||||
<p>will exit the current build with no further information given.</p> | <p>will exit the current build with no further information given.</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
BUILD FAILED | BUILD FAILED | ||||
build.xml:4: No message</pre> | build.xml:4: No message</pre> | ||||
@@ -83,7 +83,7 @@ build.xml:4: No message</pre> | |||||
<pre><fail message="Something wrong here."/></pre> | <pre><fail message="Something wrong here."/></pre> | ||||
<p>will exit the current build and print something like the following to wherever your output | <p>will exit the current build and print something like the following to wherever your output | ||||
goes:</p> | goes:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
BUILD FAILED | BUILD FAILED | ||||
build.xml:4: Something wrong here.</pre> | build.xml:4: Something wrong here.</pre> | ||||
@@ -94,7 +94,7 @@ build.xml:4: Something wrong here.</pre> | |||||
<pre><fail unless="thisdoesnotexist"/></pre> | <pre><fail unless="thisdoesnotexist"/></pre> | ||||
<p>will exit the current build and print something like the following to wherever your output | <p>will exit the current build and print something like the following to wherever your output | ||||
goes:</p> | goes:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
BUILD FAILED | BUILD FAILED | ||||
build.xml:2: unless=thisdoesnotexist</pre> | build.xml:2: unless=thisdoesnotexist</pre> | ||||
@@ -111,7 +111,7 @@ Using a condition to achieve the same effect: | |||||
</fail></pre> | </fail></pre> | ||||
<p>Output:</p> | <p>Output:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
BUILD FAILED | BUILD FAILED | ||||
build.xml:2: condition satisfied</pre> | build.xml:2: condition satisfied</pre> | ||||
@@ -45,10 +45,10 @@ the <a href="setproxy.html"><code><setproxy></code></a> task, and cannot g | |||||
via socks.</p> | via socks.</p> | ||||
<p><strong>Warning</strong>: there have been problems reported concerning | <p><strong>Warning</strong>: there have been problems reported concerning | ||||
the <code>ftp</code> <q>get</q> with the <var>newer</var> attribute. Problems might be due to | the <code>ftp</code> <q>get</q> with the <var>newer</var> attribute. Problems might be due to | ||||
format of <code>ls -l</code> differing from what is expected by commons-net, for instance due to | |||||
format of <kbd>ls -l</kbd> differing from what is expected by commons-net, for instance due to | |||||
specifics of language used by the FTP server in the directory listing. If you encounter such a | specifics of language used by the FTP server in the directory listing. If you encounter such a | ||||
problem, please send an email including a sample directory listing coming from your FTP server | problem, please send an email including a sample directory listing coming from your FTP server | ||||
(<code>ls -l</code> on the FTP prompt).</p> | |||||
(<kbd>ls -l</kbd> on the FTP prompt).</p> | |||||
<p>If you can connect but not upload or download, try setting the <var>passive</var> attribute | <p>If you can connect but not upload or download, try setting the <var>passive</var> attribute | ||||
to <q>true</q> to use the existing (open) channel, instead of having the server try to set up a new | to <q>true</q> to use the existing (open) channel, instead of having the server try to set up a new | ||||
connection.</p> | connection.</p> | ||||
@@ -134,15 +134,15 @@ connection.</p> | |||||
</tr> | </tr> | ||||
<tr id="timestampGranularity"> | <tr id="timestampGranularity"> | ||||
<td>timestampGranularity</td> | <td>timestampGranularity</td> | ||||
<td>Specify either <q>MINUTE</q>, <q>NONE</q>, (or you may specify <q></q> which is equivalent | |||||
to not specifying a value, useful for property-file driven scripts). Allows override of the | |||||
typical situation in <q>PUT</q> and <q>GET</q> where local filesystem timestamps | |||||
<td>Specify either <q>MINUTE</q> or <q>NONE</q> (you may specify <q></q> which is equivalent to | |||||
not specifying a value, useful for property-file driven scripts). Allows override of the | |||||
typical situation in <q>put</q> and <q>get</q> where local filesystem timestamps | |||||
are <code>HH:mm:ss</code> and the typical FTP server's timestamps are <code>HH:mm</code>. | are <code>HH:mm:ss</code> and the typical FTP server's timestamps are <code>HH:mm</code>. | ||||
This can throw off <var>uptodate</var> calculations. However, the default values should | This can throw off <var>uptodate</var> calculations. However, the default values should | ||||
suffice for most applications.<br/><em>Since Ant 1.7</em></td> | suffice for most applications.<br/><em>Since Ant 1.7</em></td> | ||||
<td>No; only applies in <q>put</q> and <q>get</q> where the default values are <q>MINUTE</q> | |||||
for <code>PUT</code> and <q>NONE</q> for <code>GET</code>. (It is not as necessary | |||||
in <q>get</q> because we have the <var>preservelastmodified</var> option.)</td> | |||||
<td>No; only applies for <q>put</q> (default is <q>MINUTE</q>) and <q>get</q> (default | |||||
is <q>NONE</q>; not as necessary because we have the <var>preservelastmodified</var> | |||||
option)</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>timediffmillis</td> | <td>timediffmillis</td> | ||||
@@ -167,14 +167,13 @@ connection.</p> | |||||
<tr> | <tr> | ||||
<td>chmod</td> | <td>chmod</td> | ||||
<td>sets or changes file permissions for new or existing files, Unix only. If used with | <td>sets or changes file permissions for new or existing files, Unix only. If used with | ||||
a <q>put</q> action, <code>chmod</code> will be issued for each file.</td> | |||||
a <q>put</q> action, <q>chmod</q> will be issued for each file.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>listing</td> | <td>listing</td> | ||||
<td>the file to write results of the <q>list</q> action. Required for the <q>list</q> action, | |||||
ignored otherwise.</td> | |||||
<td>No</td> | |||||
<td>the file to write results of the <q>list</q> action.</td> | |||||
<td>Yes, for the <q>list</q> action; ignored otherwise</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ignoreNoncriticalErrors</td> | <td>ignoreNoncriticalErrors</td> | ||||
@@ -531,7 +530,7 @@ directory. In fact, the <var>dir</var> attribute of the fileset is ignored comp | |||||
</ftp></pre> | </ftp></pre> | ||||
<p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and tries to delete | <p>Logs in to <samp>ftp.apache.org</samp> as <samp>anonymous</samp> and tries to delete | ||||
all <samp>*.tmp</samp> files from the default directory for that user. If you don't have permission | all <samp>*.tmp</samp> files from the default directory for that user. If you don't have permission | ||||
to delete a file, a BuildException is thrown.</p> | |||||
to delete a file, a <code>BuildException</code> is thrown.</p> | |||||
<h3>Listing Files</h3> | <h3>Listing Files</h3> | ||||
<pre> | <pre> | ||||
<ftp action="list" | <ftp action="list" | ||||
@@ -564,8 +563,8 @@ of the FTP server.</p> | |||||
server. The filesets are relative to the remote directory, not a local directory. | 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 | 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 | 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.</p> | |||||
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> | |||||
<pre> | <pre> | ||||
<ftp action="rmdir" | <ftp action="rmdir" | ||||
@@ -39,7 +39,7 @@ authentication is used. This is only secure over an HTTPS link.</p> | |||||
<p><strong>Proxies</strong>. <em>Since Apache Ant 1.7.0</em>, Ant running on Java 5 or later | <p><strong>Proxies</strong>. <em>Since Apache Ant 1.7.0</em>, Ant running on Java 5 or later | ||||
can <a href="../proxy.html">use the proxy settings of the operating system</a> if enabled with | can <a href="../proxy.html">use the proxy settings of the operating system</a> if enabled with | ||||
the <code>-autoproxy</code> command line option. There is also | |||||
the <kbd>-autoproxy</kbd> command line option. There is also | |||||
the <a href="../Tasks/setproxy.html"><setproxy></a> task for earlier Java versions. With | the <a href="../Tasks/setproxy.html"><setproxy></a> task for earlier Java versions. With | ||||
proxies turned on, <code><get></code> requests against localhost may not work as expected, if | proxies turned on, <code><get></code> requests against localhost may not work as expected, if | ||||
the request is relayed to the proxy.</p> | the request is relayed to the proxy.</p> | ||||
@@ -247,7 +247,7 @@ it is not possible to <code>import</code> the same file more than once.</p> | |||||
<p>Running the build file will emit:</p> | <p>Running the build file will emit:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
setUp: | setUp: | ||||
nested.echo: | nested.echo: | ||||
@@ -272,7 +272,7 @@ test: | |||||
<p>Running the target build file will emit:</p> | <p>Running the target build file will emit:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
nested.setUp: | nested.setUp: | ||||
nested.echo: | nested.echo: | ||||
@@ -242,7 +242,7 @@ it is not possible to <code>import</code> the same file more than once.</p> | |||||
<p>Running the build file will emit:</p> | <p>Running the build file will emit:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
setUp: | setUp: | ||||
nested.echo: | nested.echo: | ||||
@@ -267,7 +267,7 @@ test: | |||||
<p>Running the target build file will emit:</p> | <p>Running the target build file will emit:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
nested.setUp: | nested.setUp: | ||||
nested.echo: | nested.echo: | ||||
@@ -29,8 +29,8 @@ | |||||
<p>Try to locate a jar to satisfy an extension and place location of jar into property. The task | <p>Try to locate a jar to satisfy an extension and place location of jar into property. The task | ||||
allows you to add a number of resolvers that are capable of locating a library for a specific | allows you to add a number of resolvers that are capable of locating a library for a specific | ||||
extension. Each resolver will be attempted in specified order until library is found or no resolvers | extension. Each resolver will be attempted in specified order until library is found or no resolvers | ||||
are left. If no resolvers are left and <var>failOnError</var> is true then a BuildException will be | |||||
thrown.</p> | |||||
are left. If no resolvers are left and <var>failOnError</var> is true then | |||||
a <code>BuildException</code> will be thrown.</p> | |||||
<p>Note that this task works with extensions as defined by the "Optional Package" specification. | <p>Note that this task works with extensions as defined by the "Optional Package" specification. | ||||
For more information about optional packages, see the document <em>Optional Package Versioning</em> | For more information about optional packages, see the document <em>Optional Package Versioning</em> | ||||
@@ -104,7 +104,7 @@ to project directory.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>destdir</td> | <td>destdir</td> | ||||
<td>The directory in which to place downloaded file.</td> | |||||
<td class="left">The directory in which to place downloaded file.</td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -35,7 +35,7 @@ the <var>input</var> and <var>inputstring</var> attributes.</p> | |||||
<h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> | <h4 id="background">Running Ant as a background process on Unix(-like) systems</h4> | ||||
<p>If you run Ant as a background process (like <code>ant &</code>) and use | |||||
<p>If you run Ant as a background process (like <kbd>ant &</kbd>) and use | |||||
the <code><java></code> task with <var>spawn</var> set to <q>false</q> and <var>fork</var> | the <code><java></code> task with <var>spawn</var> set to <q>false</q> and <var>fork</var> | ||||
to <q>true</q>, you must provide explicit input to the forked process or Ant will be suspended | to <q>true</q>, you must provide explicit input to the forked process or Ant will be suspended | ||||
because it tries to read from the standard input.</p> | because it tries to read from the standard input.</p> | ||||
@@ -112,7 +112,7 @@ because it tries to read from the standard input.</p> | |||||
<td>the command used to invoke JVM. The command is resolved | <td>the command used to invoke JVM. The command is resolved | ||||
by <code>java.lang.Runtime.exec()</code>. Ignored if <var>fork</var> is <q>false</q>. | by <code>java.lang.Runtime.exec()</code>. Ignored if <var>fork</var> is <q>false</q>. | ||||
</td> | </td> | ||||
<td>No, default is <q>java</q></td> | |||||
<td>No, default is <kbd>java</kbd></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>jvmargs</td> | <td>jvmargs</td> | ||||
@@ -85,7 +85,7 @@ in <code>JAVA_HOME</code>.</p> | |||||
when it puts together the command line switches—even if you set <var>fork</var>=<q>true</q>. | when it puts together the command line switches—even if you set <var>fork</var>=<q>true</q>. | ||||
This is useful if you want to run the compiler of JDK 1.1 while your current JDK is 1.2+. If you | This is useful if you want to run the compiler of JDK 1.1 while your current JDK is 1.2+. If you | ||||
use <var>compiler</var>=<q>javac1.1</q> and (for example) <var>depend</var>=<q>true</q>, Ant will | use <var>compiler</var>=<q>javac1.1</q> and (for example) <var>depend</var>=<q>true</q>, Ant will | ||||
use the command line switch <code>-depend</code> instead of <code>-Xdepend</code>.</p> | |||||
use the command line switch <kbd>-depend</kbd> instead of <kbd>-Xdepend</kbd>.</p> | |||||
<p>This task will drop all entries that point to non-existent files/directories from the classpath | <p>This task will drop all entries that point to non-existent files/directories from the classpath | ||||
it passes to the compiler.</p> | it passes to the compiler.</p> | ||||
<p>The working directory for a forked executable (if any) is the project's base directory.</p> | <p>The working directory for a forked executable (if any) is the project's base directory.</p> | ||||
@@ -95,7 +95,7 @@ release them. The side effect of this is that you will not be able to delete or | |||||
later on in the build. The workaround is to fork when invoking the compiler.</p> | later on in the build. The workaround is to fork when invoking the compiler.</p> | ||||
<p>If you are using Java 8 or above and your source contains native methods or fields annotated with | <p>If you are using Java 8 or above and your source contains native methods or fields annotated with | ||||
the <code>@Native</code> annotation you can set the <var>nativeheaderdir</var> attribute in order to | the <code>@Native</code> annotation you can set the <var>nativeheaderdir</var> attribute in order to | ||||
use the <code>-h</code> switch of <code>javac</code> to generate the native header files. Note that | |||||
use the <kbd>-h</kbd> switch of <kbd>javac</kbd> to generate the native header files. Note that | |||||
the logic Ant uses to determine which files to compile does not take native headers into account, | the logic Ant uses to determine which files to compile does not take native headers into account, | ||||
i.e. if the <samp>.class</samp> is more recent than the corresponding <samp>.java</samp> file the | i.e. if the <samp>.class</samp> is more recent than the corresponding <samp>.java</samp> file the | ||||
file will not get compiled even if a native header file generated for it would be outdated.</p> | file will not get compiled even if a native header file generated for it would be outdated.</p> | ||||
@@ -157,7 +157,7 @@ file will not get compiled even if a native header file generated for it would b | |||||
<tr> | <tr> | ||||
<td>bootclasspath</td> | <td>bootclasspath</td> | ||||
<td>Location of bootstrap class files. (See <a href="#bootstrap">below</a> for using | <td>Location of bootstrap class files. (See <a href="#bootstrap">below</a> for using | ||||
the <code>-X</code> and <code>-J-X</code> parameters for specifying the bootstrap | |||||
the <kbd>-X</kbd> and <kbd>-J-X</kbd> parameters for specifying the bootstrap | |||||
classpath).</td> | classpath).</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -192,13 +192,13 @@ file will not get compiled even if a native header file generated for it would b | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>nowarn</td> | <td>nowarn</td> | ||||
<td>Indicates whether the <code>-nowarn</code> switch should be passed to the compiler.</td> | |||||
<td>Indicates whether the <kbd>-nowarn</kbd> switch should be passed to the compiler.</td> | |||||
<td>No; defaults to <q>off</q></td> | <td>No; defaults to <q>off</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>debug</td> | <td>debug</td> | ||||
<td>Indicates whether source should be compiled with debug information. If set | <td>Indicates whether source should be compiled with debug information. If set | ||||
to <q>off</q>, <code>-g:none</code> will be passed on the command line for compilers that | |||||
to <q>off</q>, <kbd>-g:none</kbd> will be passed on the command line for compilers that | |||||
support it (for other compilers, no command line argument will be used). If set | support it (for other compilers, no command line argument will be used). If set | ||||
to <q>true</q>, the value of the <var>debuglevel</var> attribute determines the command line | to <q>true</q>, the value of the <var>debuglevel</var> attribute determines the command line | ||||
argument.</td> | argument.</td> | ||||
@@ -206,17 +206,17 @@ file will not get compiled even if a native header file generated for it would b | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>debuglevel</td> | <td>debuglevel</td> | ||||
<td>Keyword list to be appended to the <code>-g</code> command-line switch. Legal values | |||||
<td>Keyword list to be appended to the <kbd>-g</kbd> command-line switch. Legal values | |||||
are <q>none</q> or a comma-separated list of the following | are <q>none</q> or a comma-separated list of the following | ||||
keywords: <q>lines</q>, <q>vars</q>, and <q>source</q>.</td> | keywords: <q>lines</q>, <q>vars</q>, and <q>source</q>.</td> | ||||
<td>No; ignored when <var>debug</var> is <q>false</q> or any implementation other | <td>No; ignored when <var>debug</var> is <q>false</q> or any implementation other | ||||
than <q>modern</q>, <q>javac1.2</q> and <q>jikes</q>; by default, nothing will be appended | than <q>modern</q>, <q>javac1.2</q> and <q>jikes</q>; by default, nothing will be appended | ||||
to <code>-g</code></td> | |||||
to <kbd>-g</kbd></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>optimize</td> | <td>optimize</td> | ||||
<td>Indicates whether source should be compiled with optimization. <strong>Note</strong> that | <td>Indicates whether source should be compiled with optimization. <strong>Note</strong> that | ||||
this flag is just ignored by Sun's <code>javac</code> since JDK 1.3 (because compile-time | |||||
this flag is just ignored by Sun's <kbd>javac</kbd> since JDK 1.3 (because compile-time | |||||
optimization is unnecessary).</td> | optimization is unnecessary).</td> | ||||
<td>No; defaults to <q>off</q></td> | <td>No; defaults to <q>off</q></td> | ||||
</tr> | </tr> | ||||
@@ -259,21 +259,21 @@ file will not get compiled even if a native header file generated for it would b | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>executable</td> | <td>executable</td> | ||||
<td>Complete path to the <code>javac</code> executable to use in case of <var>fork</var> | |||||
<td>Complete path to the <kbd>javac</kbd> executable to use in case of <var>fork</var> | |||||
is <q>yes</q>.<br/><em>Since Ant 1.6</em> this attribute can also be used to specify the path | is <q>yes</q>.<br/><em>Since Ant 1.6</em> this attribute can also be used to specify the path | ||||
to the executable when using <q>jikes</q>, <q>jvc</q>, <q>gcj</q> or <q>sj</q>.</td> | to the executable when using <q>jikes</q>, <q>jvc</q>, <q>gcj</q> or <q>sj</q>.</td> | ||||
<td>No; defaults to the compiler of current JDK, ignored if <var>fork</var> is <q>no</q></td> | <td>No; defaults to the compiler of current JDK, ignored if <var>fork</var> is <q>no</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>memoryInitialSize</td> | <td>memoryInitialSize</td> | ||||
<td>The initial size of the memory for the underlying JVM, if <code>javac</code> is run | |||||
<td>The initial size of the memory for the underlying JVM, if <kbd>javac</kbd> is run | |||||
externally. (Examples: <q>83886080</q>, <q>81920k</q>, or <q>80m</q>)</td> | externally. (Examples: <q>83886080</q>, <q>81920k</q>, or <q>80m</q>)</td> | ||||
<td>No; defaults to the standard JVM memory setting, ignored if <var>fork</var> | <td>No; defaults to the standard JVM memory setting, ignored if <var>fork</var> | ||||
is <q>no</q></td> | is <q>no</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>memoryMaximumSize</td> | <td>memoryMaximumSize</td> | ||||
<td>The maximum size of the memory for the underlying JVM, if <code>javac</code> is run | |||||
<td>The maximum size of the memory for the underlying JVM, if <kbd>javac</kbd> is run | |||||
externally; ignored otherwise. (Examples: <q>83886080</q>, <q>81920k</q>, or <q>80m</q>)</td> | externally; ignored otherwise. (Examples: <q>83886080</q>, <q>81920k</q>, or <q>80m</q>)</td> | ||||
<td>No; defaults to the standard JVM memory setting, ignored if <var>fork</var> | <td>No; defaults to the standard JVM memory setting, ignored if <var>fork</var> | ||||
is <q>no</q></td> | is <q>no</q></td> | ||||
@@ -290,14 +290,14 @@ file will not get compiled even if a native header file generated for it would b | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>source</td> | <td>source</td> | ||||
<td>Java language features accepted by compiler, as specified by the <code>-source</code> | |||||
<td>Java language features accepted by compiler, as specified by the <kbd>-source</kbd> | |||||
command-line switch. Valid feature versions are <q>1.3</q>, <q>1.4</q>, <q>1.5</q> | command-line switch. Valid feature versions are <q>1.3</q>, <q>1.4</q>, <q>1.5</q> | ||||
or <q>5</q>, etc. The attribute will be ignored by all implementations prior | or <q>5</q>, etc. The attribute will be ignored by all implementations prior | ||||
to <q>javac1.4</q> (or <q>modern</q> when Ant is not running in a JVM 1.3), <q>gcj</q> | to <q>javac1.4</q> (or <q>modern</q> when Ant is not running in a JVM 1.3), <q>gcj</q> | ||||
and <q>jikes</q>.<br/> If you use this attribute together with <q>gcj</q> or <q>jikes</q>, you | and <q>jikes</q>.<br/> If you use this attribute together with <q>gcj</q> or <q>jikes</q>, you | ||||
must make sure that your version supports the <code>-source</code> (or <code>-fsource</code> | |||||
for <code>gcj</code>) switch.</td> | |||||
<td>No; by default, no <code>-source</code> argument will be used at all unless the magic | |||||
must make sure that your version supports the <kbd>-source</kbd> (or <kbd>-fsource</kbd> | |||||
for <kbd>gcj</kbd>) switch.</td> | |||||
<td>No; by default, no <kbd>-source</kbd> argument will be used at all unless the magic | |||||
<a href="../javacprops.html#source"><code>ant.build.javac.source</code></a> property is | <a href="../javacprops.html#source"><code>ant.build.javac.source</code></a> property is | ||||
set<br/><strong>Note that the default value depends on JDK that is running Ant. We highly | set<br/><strong>Note that the default value depends on JDK that is running Ant. We highly | ||||
recommend to always specify this attribute.</strong></td> | recommend to always specify this attribute.</strong></td> | ||||
@@ -305,7 +305,7 @@ file will not get compiled even if a native header file generated for it would b | |||||
<tr> | <tr> | ||||
<td>target</td> | <td>target</td> | ||||
<td>Generate class files for specific JVM version (cross-compile).</td> | <td>Generate class files for specific JVM version (cross-compile).</td> | ||||
<td>No; by default, no <code>-target</code> argument will be used at all unless the | |||||
<td>No; by default, no <kbd>-target</kbd> argument will be used at all unless the | |||||
magic <a href="../javacprops.html#target"><code>ant.build.javac.target</code></a> property is | magic <a href="../javacprops.html#target"><code>ant.build.javac.target</code></a> property is | ||||
set<br/><strong>Note that the default value depends on JDK that is running Ant and | set<br/><strong>Note that the default value depends on JDK that is running Ant and | ||||
on <var>source</var> | on <var>source</var> | ||||
@@ -344,7 +344,7 @@ file will not get compiled even if a native header file generated for it would b | |||||
are on the classpath for the compiler. This means that "greedy" compilers will not recompile | are on the classpath for the compiler. This means that "greedy" compilers will not recompile | ||||
dependent classes that are already compiled. In general this is a good thing as it stops the | dependent classes that are already compiled. In general this is a good thing as it stops the | ||||
compiler for doing unnecessary work. However, for some edge cases, involving generics, | compiler for doing unnecessary work. However, for some edge cases, involving generics, | ||||
the <code>javac</code> compiler needs to compile the dependent classes to get the generics | |||||
the <kbd>javac</kbd> compiler needs to compile the dependent classes to get the generics | |||||
information. One example is documented in the bug | information. One example is documented in the bug | ||||
report: <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=40776" target="_top">Bug | report: <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=40776" target="_top">Bug | ||||
40776 - a problem compiling a Java 5 project with generics</a>. Setting the attribute | 40776 - a problem compiling a Java 5 project with generics</a>. Setting the attribute | ||||
@@ -371,7 +371,7 @@ file will not get compiled even if a native header file generated for it would b | |||||
<tr> | <tr> | ||||
<td>modulepathref</td> | <td>modulepathref</td> | ||||
<td>The <var>modulepath</var> to use, given as <a href="../using.html#references">reference</a> | <td>The <var>modulepath</var> to use, given as <a href="../using.html#references">reference</a> | ||||
to a PATH defined elsewhere. <em>since Ant 1.9.7</em></td> | |||||
to a path defined elsewhere. <em>since Ant 1.9.7</em></td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -384,7 +384,7 @@ file will not get compiled even if a native header file generated for it would b | |||||
<tr> | <tr> | ||||
<td>modulesourcepathref</td> | <td>modulesourcepathref</td> | ||||
<td>The <var>modulesourcepath</var> to use, given | <td>The <var>modulesourcepath</var> to use, given | ||||
as <a href="../using.html#references">reference</a> to a PATH defined elsewhere. <em>since | |||||
as <a href="../using.html#references">reference</a> to a path defined elsewhere. <em>since | |||||
Ant 1.9.7</em></td> | Ant 1.9.7</em></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -397,22 +397,21 @@ file will not get compiled even if a native header file generated for it would b | |||||
<tr> | <tr> | ||||
<td>upgrademodulepathref</td> | <td>upgrademodulepathref</td> | ||||
<td>The <var>upgrademodulepath</var> to use, given | <td>The <var>upgrademodulepath</var> to use, given | ||||
as <a href="../using.html#references">reference</a> to a PATH defined elsewhere. <em>since Ant | |||||
as <a href="../using.html#references">reference</a> to a path defined elsewhere. <em>since Ant | |||||
1.9.7</em></td> | 1.9.7</em></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>nativeheaderdir</td> | <td>nativeheaderdir</td> | ||||
<td>Specify where to place generated native header files. Ignored when running on JDK < | |||||
8. <em>Since Ant 1.9.8</em>. | |||||
<td>No</td> | |||||
<td>Specify where to place generated native header files. <em>Since Ant 1.9.8</em>. | |||||
<td>No, ignored when running on JDK 7 or earlier</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>release</td> | <td>release</td> | ||||
<td>Specify the value for the <code>--release</code> switch. Ignored when running on JDK < | |||||
9.<br/>When set and running on JDK >= 9 the <var>source</var> and <var>target</var> | |||||
attributes as well as the <var>bootclasspath</var> will be ignored. <em>Since Ant 1.9.8</em>. | |||||
<td>No</td> | |||||
<td>Specify the value for the <kbd>--release</kbd> switch.<br/>When set and running on JDK 9+ | |||||
the <var>source</var> and <var>target</var> attributes as well as the <var>bootclasspath</var> | |||||
will be ignored. <em>Since Ant 1.9.8</em>. | |||||
<td>No, ignored when running on JDK 8 or earlier</td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -510,7 +509,7 @@ is <q>1.4</q>, so you can use <code>assert</code> statements.</p> | |||||
<p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores | <p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores | ||||
the <samp>.class</samp> files in the <samp>${build}</samp> directory. This will fork off the Java | the <samp>.class</samp> files in the <samp>${build}</samp> directory. This will fork off the Java | ||||
compiler using the default <code>javac</code> executable. The source level is <q>1.2</q> (similar | |||||
compiler using the default <kbd>javac</kbd> executable. The source level is <q>1.2</q> (similar | |||||
to <q>1.1</q> or <q>1.3</q>) and the class files should be runnable under JDK 1.2+ as well.</p> | to <q>1.1</q> or <q>1.3</q>) and the class files should be runnable under JDK 1.2+ as well.</p> | ||||
<pre> | <pre> | ||||
@@ -521,7 +520,7 @@ to <q>1.1</q> or <q>1.3</q>) and the class files should be runnable under JDK 1. | |||||
<p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores | <p>compiles all <samp>.java</samp> files under the <samp>${src}</samp> directory, and stores | ||||
the <samp>.class</samp> files in the <samp>${build}</samp> directory. This will fork off the Java | the <samp>.class</samp> files in the <samp>${build}</samp> directory. This will fork off the Java | ||||
compiler, using the executable named <code>java$javac.exe</code>. Note that the <q>$</q> sign needs | |||||
compiler, using the executable named <kbd>java$javac.exe</kbd>. Note that the <q>$</q> sign needs | |||||
to be escaped by a second one. The source level is <q>1.5</q>, so you can use generics.</p> | to be escaped by a second one. The source level is <q>1.5</q>, so you can use generics.</p> | ||||
<pre> | <pre> | ||||
@@ -563,9 +562,9 @@ elements as follows:</p> | |||||
<exclude name="mypackage/p1/testpackage/**"/> | <exclude name="mypackage/p1/testpackage/**"/> | ||||
</javac></pre> | </javac></pre> | ||||
<p>If you want to run the <code>javac</code> compiler of a different JDK, you should tell Ant, where | |||||
<p>If you want to run the <kbd>javac</kbd> compiler of a different JDK, you should tell Ant, where | |||||
to find the compiler and which version of JDK you will be using so it can choose the correct command | to find the compiler and which version of JDK you will be using so it can choose the correct command | ||||
line switches. The following example executes a JDK 1.1 <code>javac</code> in a new process and | |||||
line switches. The following example executes a JDK 1.1 <kbd>javac</kbd> in a new process and | |||||
uses the correct command line switches even when Ant is running in a JVM of a different version:</p> | uses the correct command line switches even when Ant is running in a JVM of a different version:</p> | ||||
<pre> | <pre> | ||||
@@ -610,7 +609,7 @@ log, that these settings are fix.</p> | |||||
<p><strong>Note</strong>: If you are using Ant on Windows and a new DOS window pops up for every use | <p><strong>Note</strong>: If you are using Ant on Windows and a new DOS window pops up for every use | ||||
of an external compiler, this may be a problem of the JDK you are using. This problem may occur | of an external compiler, this may be a problem of the JDK you are using. This problem may occur | ||||
with all JDKs < 1.2.</p> | |||||
with all JDKs prior to 1.2.</p> | |||||
<p>If you want to activate other compiler options like <code>lint</code> you could use | <p>If you want to activate other compiler options like <code>lint</code> you could use | ||||
the <code><compilerarg></code> element:</p> | the <code><compilerarg></code> element:</p> | ||||
@@ -670,7 +669,7 @@ compilation module set. The <code>{ ... , ... }</code> express alternates for e | |||||
compilation uses application modules located in <code>modules</code> folder.The source level | compilation uses application modules located in <code>modules</code> folder.The source level | ||||
is <q>9</q> to enable modules.</p> | is <q>9</q> to enable modules.</p> | ||||
<h3>Jikes notes</h3> | |||||
<h3 id="jikes">Jikes notes</h3> | |||||
<p>You need Jikes 1.15 or later.</p> | <p>You need Jikes 1.15 or later.</p> | ||||
@@ -682,7 +681,7 @@ and must be set to <q>true</q> or <q>yes</q> to be interpreted as anything other | |||||
than <q>false</q>. By default, <code>build.compiler.warnings</code> is <q>true</q>, while all others | than <q>false</q>. By default, <code>build.compiler.warnings</code> is <q>true</q>, while all others | ||||
are <q>false</q>.</p> | are <q>false</q>.</p> | ||||
<table class="attr"> | |||||
<table> | |||||
<tr> | <tr> | ||||
<th>Property</th> | <th>Property</th> | ||||
<th>Description</th> | <th>Description</th> | ||||
@@ -705,24 +704,24 @@ are <q>false</q>.</p> | |||||
<td><q>false</q></td> | <td><q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>build.compiler.warnings<br/><em><u>Deprecated</u></em>. Use <code><javac></code>'s <var>nowarn</var> | |||||
attribute instead.</td> | |||||
<td><code>build.compiler.warnings</code><br/><em><u>Deprecated</u></em>. | |||||
Use <code><javac></code>'s <var>nowarn</var> attribute instead.</td> | |||||
<td>Don't disable warning messages.</td> | <td>Don't disable warning messages.</td> | ||||
<td><q>true</q></td> | <td><q>true</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<h3>Jvc notes</h3> | |||||
<h3 id="jvc">Jvc notes</h3> | |||||
<p><q>Jvc</q> will enable Microsoft extensions unless you set the | <p><q>Jvc</q> will enable Microsoft extensions unless you set the | ||||
property <code>build.compiler.jvc.extensions</code> to <q>false</q> before | property <code>build.compiler.jvc.extensions</code> to <q>false</q> before | ||||
invoking <code><javac></code>.</p> | invoking <code><javac></code>.</p> | ||||
<h3 id="bootstrap">Bootstrap options</h3> | <h3 id="bootstrap">Bootstrap options</h3> | ||||
<p>The Sun <code>javac</code> compiler has a <code>bootclasspath</code> command line | |||||
<p>The Sun <kbd>javac</kbd> compiler has a <kbd>-bootclasspath</kbd> command line | |||||
option—this corresponds to the <var>bootclasspath</var> attribute/element of | option—this corresponds to the <var>bootclasspath</var> attribute/element of | ||||
the <code><javac></code> task. The Sun compiler also allows more control over the boot | the <code><javac></code> task. The Sun compiler also allows more control over the boot | ||||
classpath using the <code>-X</code> and <code>-J-X</code> attributes. One can set these by using | |||||
classpath using the <kbd>-X</kbd> and <kbd>-J-X</kbd> attributes. One can set these by using | |||||
the <code><compilerarg></code>. <em>Since Ant 1.6.0</em>, there is a shortcut to convert path | the <code><compilerarg></code>. <em>Since Ant 1.6.0</em>, there is a shortcut to convert path | ||||
references to strings that can by used in an OS independent fashion | references to strings that can by used in an OS independent fashion | ||||
(see <a href="../using.html#pathshortcut">pathshortcut</a>). For example:</p> | (see <a href="../using.html#pathshortcut">pathshortcut</a>). For example:</p> | ||||
@@ -739,10 +738,10 @@ references to strings that can by used in an OS independent fashion | |||||
<p>The <a href="http://openjdk.java.net/" target="_top">OpenJDK</a> project has provided | <p>The <a href="http://openjdk.java.net/" target="_top">OpenJDK</a> project has provided | ||||
the <code>javac</code> <a href="http://openjdk.java.net/groups/compiler/" target="_top">compiler</a> | the <code>javac</code> <a href="http://openjdk.java.net/groups/compiler/" target="_top">compiler</a> | ||||
as an open source project. The output of this project is a <code>javac.jar</code> which contains | as an open source project. The output of this project is a <code>javac.jar</code> which contains | ||||
the <code>javac</code> compiler. This compiler may be used with the <code><javac></code> task | |||||
with the use of a <code>-Xbootclasspath/p</code> Java argument. The argument needs to be given to | |||||
the runtime system of the <code>javac</code> executable, so it needs to be prepended with | |||||
a <code>-J</code>, for example:</p> | |||||
the <kbd>javac</kbd> compiler. This compiler may be used with the <code><javac></code> task | |||||
with the use of a <kbd>-Xbootclasspath/p</kbd> Java argument. The argument needs to be given to the | |||||
runtime system of the <kbd>javac</kbd> executable, so it needs to be prepended with a <kbd>-J</kbd>, | |||||
for example:</p> | |||||
<pre> | <pre> | ||||
<property name="patched.javac.jar" | <property name="patched.javac.jar" | ||||
@@ -29,23 +29,23 @@ | |||||
task and it's there for backwards compatibility reasons. Since this task will be removed in future | task and it's there for backwards compatibility reasons. Since this task will be removed in future | ||||
versions, you are strongly encouraged to use <a href="javadoc.html">javadoc</a> instead.</em></p> | versions, you are strongly encouraged to use <a href="javadoc.html">javadoc</a> instead.</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Generates code documentation using the <code>javadoc</code> tool.</p> | |||||
<p>Generates code documentation using the <kbd>javadoc</kbd> tool.</p> | |||||
<p>The source directory will be recursively scanned for Java source files to process but only those | <p>The source directory will be recursively scanned for Java source files to process but only those | ||||
matching the inclusion rules, and not matching the exclusions rules will be passed to | matching the inclusion rules, and not matching the exclusions rules will be passed to | ||||
the <code>javadoc</code> tool. This allows wildcards to be used to choose between package names, | |||||
the <kbd>javadoc</kbd> 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 | reducing verbosity and management costs over time. This task, however, has no notion of | ||||
"changed" files, unlike the <a href="javac.html">javac</a> task. This means all packages | "changed" files, unlike the <a href="javac.html">javac</a> task. This means all packages | ||||
will be processed each time this task is run. In general, however, this task is used much less | will be processed each time this task is run. In general, however, this task is used much less | ||||
frequently.</p> | frequently.</p> | ||||
<p><strong>Note</strong>: since <code>javadoc</code> | |||||
calls <code>System.exit()</code>, <code>javadoc</code> cannot be run inside the same JVM as Apache | |||||
Ant without breaking functionality. For this reason, this task always forks JVM. This overhead is | |||||
not significant since <code>javadoc</code> is normally a heavy application and will be called | |||||
infrequently.</p> | |||||
<p><strong>Note</strong>: since <kbd>javadoc</kbd> | |||||
calls <code class="code">System.exit()</code>, <kbd>javadoc</kbd> cannot be run inside the same | |||||
JVM as Apache Ant without breaking functionality. For this reason, this task always forks JVM. This | |||||
overhead is not significant since <kbd>javadoc</kbd> is normally a heavy application and will be | |||||
called infrequently.</p> | |||||
<p><strong>Note</strong>: the <var>packagelist</var> attribute allows you to specify the list of | <p><strong>Note</strong>: the <var>packagelist</var> attribute allows you to specify the list of | ||||
packages to document outside of the Ant file. It's a much better practice to include everything | packages to document outside of the Ant file. It's a much better practice to include everything | ||||
inside the <code>build.xml</code> file. This option was added in order to make it easier to migrate | inside the <code>build.xml</code> file. This option was added in order to make it easier to migrate | ||||
from regular makefiles, where you would use this option of <code>javadoc</code>. The packages | |||||
from regular makefiles, where you would use this option of <kbd>javadoc</kbd>. The packages | |||||
listed in <var>packagelist</var> are not checked, so the task performs even if some packages are | listed in <var>packagelist</var> are not checked, so the task performs even if some packages are | ||||
missing or broken. Use this option if you wish to convert from an existing makefile. Once things are | missing or broken. Use this option if you wish to convert from an existing makefile. Once things are | ||||
running you should then switch to the regular notation.</p> | running you should then switch to the regular notation.</p> | ||||
@@ -56,20 +56,22 @@ acceptable. JDKs < 1.4 are no longer supported. If you specify the <var>exec | |||||
attribute it is up to you to ensure that this command supports the attributes you wish to use.</p> | attribute it is up to you to ensure that this command supports the attributes you wish to use.</p> | ||||
<p><strong>Note</strong>: When generating the JavaDocs for classes which contains annotations you | <p><strong>Note</strong>: When generating the JavaDocs for classes which contains annotations you | ||||
maybe get a <code>java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl</code>. This is | |||||
due <a href="https://bugs.openjdk.java.net/browse/JDK-6442982" target="_top">bug-6442982</a>. The | |||||
cause is that JavaDoc cannot find the implementations of used annotations. The workaround is | |||||
providing the jars with these implementations (like JAXBs <code>@XmlType</code>, ...) | |||||
to <code><javadoc></code> using <var>classpath</var>, <var>classpathref</var> attributes or | |||||
maybe get a <code class="output">java.lang.ClassCastException: | |||||
com.sun.tools.javadoc.ClassDocImpl</code>. This is | |||||
due <a href="https://bugs.openjdk.java.net/browse/JDK-6442982" target="_top">bug 6442982</a>. The | |||||
cause is that <kbd>javadoc</kbd> cannot find the implementations of used annotations. The | |||||
workaround is providing the jars with these implementations (like | |||||
JAXBs <code class="code">@XmlType</code>, ...) to <code><javadoc></code> | |||||
using <var>classpath</var>, <var>classpathref</var> attributes or | |||||
nested <code><classpath></code> element.</p> | nested <code><classpath></code> element.</p> | ||||
<p><strong>Note</strong>: many problems with running <code>javadoc</code> stem from command lines | |||||
<p><strong>Note</strong>: many problems with running <kbd>javadoc</kbd> stem from command lines | |||||
that have become too long—even though the error message doesn't give the slightest hint this | that have become too long—even though the error message doesn't give the slightest hint this | ||||
may be the problem. If you encounter problems with the task, try to set | may be the problem. If you encounter problems with the task, try to set | ||||
the <var>useexternalfile</var> attribute to <q>true</q> first.</p> | the <var>useexternalfile</var> attribute to <q>true</q> first.</p> | ||||
<p>If you use multiple ways to specify where <code>javadoc</code> should be looking for sources, | |||||
your result will be the union of all specified documentations. If you, e.g., specify | |||||
<p>If you use multiple ways to specify where <kbd>javadoc</kbd> should be looking for sources, your | |||||
result will be the union of all specified documentations. If you, e.g., specify | |||||
a <var>sourcepath</var> attribute and also a nested <code>packageset</code> both pointing at the | a <var>sourcepath</var> attribute and also a nested <code>packageset</code> both pointing at the | ||||
same directory your <var>excludepackagenames</var> attribute won't have any effect unless it agrees | same directory your <var>excludepackagenames</var> attribute won't have any effect unless it agrees | ||||
with the <var>exclude</var> patterns of the <code>packageset</code> (and vice versa).</p> | with the <var>exclude</var> patterns of the <code>packageset</code> (and vice versa).</p> | ||||
@@ -110,7 +112,7 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>maxmemory</td> | <td>maxmemory</td> | ||||
<td>Max amount of memory to allocate to the <code>javadoc</code> JVM</td> | |||||
<td>Max amount of memory to allocate to the <kbd>javadoc</kbd> JVM</td> | |||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -199,14 +201,14 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
<tr> | <tr> | ||||
<td>Old</td> | <td>Old</td> | ||||
<td>Generate output using JDK 1.1 emulating doclet.<br/><strong>Note</strong>: <em>Since Ant | <td>Generate output using JDK 1.1 emulating doclet.<br/><strong>Note</strong>: <em>Since Ant | ||||
1.8.0</em> this attribute has no effect because <code>javadoc</code> of Java 1.4 and later | |||||
does not support the <code>-1.1</code> switch anymore.</td> | |||||
1.8.0</em> this attribute has no effect because <kbd>javadoc</kbd> of Java 1.4 and later | |||||
does not support the <kbd>-1.1</kbd> switch anymore.</td> | |||||
<td>1.2</td> | <td>1.2</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>Verbose</td> | <td>Verbose</td> | ||||
<td>Output messages about what Javadoc is doing</td> | |||||
<td>Output messages about what <kbd>javadoc</kbd> is doing</td> | |||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -375,24 +377,23 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>docletpath</td> | <td>docletpath</td> | ||||
<td>Specifies the path to the doclet class file that is specified with the <code>-doclet</code> | |||||
<td>Specifies the path to the doclet class file that is specified with the <kbd>-doclet</kbd> | |||||
option.</td> | option.</td> | ||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>docletpathref</td> | <td>docletpathref</td> | ||||
<td>Specifies the path to the doclet class file that is specified with the <code>-doclet</code> | |||||
option by <a href="../using.html#references">reference</a> to a PATH defined elsewhere.</td> | |||||
<td>Specifies the path to the doclet class file that is specified with the <kbd>-doclet</kbd> | |||||
option by <a href="../using.html#references">reference</a> to a path defined elsewhere.</td> | |||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>additionalparam</td> | <td>additionalparam</td> | ||||
<td>Lets you add additional parameters to the <code>javadoc</code> command line. Useful for | |||||
<td>Lets you add additional parameters to the <kbd>javadoc</kbd> command line. Useful for | |||||
doclets. Parameters containing spaces need to be quoted using &quot;—see also the | doclets. Parameters containing spaces need to be quoted using &quot;—see also the | ||||
nested | |||||
<code>arg</code> element.</td> | |||||
nested <code>arg</code> element.</td> | |||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -404,7 +405,7 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonwarning</td> | <td>failonwarning</td> | ||||
<td>Stop the build process if a warning is emitted—i.e. if <code>javadoc</code>'s output | |||||
<td>Stop the build process if a warning is emitted—i.e. if <kbd>javadoc</kbd>'s output | |||||
contains the word <q>warning</q>. <em>since Ant 1.9.4</em></td> | contains the word <q>warning</q>. <em>since Ant 1.9.4</em></td> | ||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
@@ -434,8 +435,8 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>source</td> | <td>source</td> | ||||
<td>Enable <code>javadoc</code> to handle Java language features. Set this to <q>1.4</q> to | |||||
document code that compiles using <code>javac -source 1.4</code>, etc.</td> | |||||
<td>Enable <kbd>javadoc</kbd> to handle Java language features. Set this to <q>1.4</q> to | |||||
document code that compiles using <kbd>javac -source 1.4</kbd>, etc.</td> | |||||
<td>1.4+</td> | <td>1.4+</td> | ||||
<td>No; default can be provided using the magic | <td>No; default can be provided using the magic | ||||
<a href="../javacprops.html#source"><code>ant.build.javac.source</code></a> property.</td> | <a href="../javacprops.html#source"><code>ant.build.javac.source</code></a> property.</td> | ||||
@@ -454,7 +455,7 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>noqualifier</td> | <td>noqualifier</td> | ||||
<td>Enables the <code>-noqualifier</code> argument—must be <q>all</q> or a colon separated | |||||
<td>Enables the <kbd>-noqualifier</kbd> argument—must be <q>all</q> or a colon separated | |||||
list of packages. <em>since Ant 1.6</em>.</td> | list of packages. <em>since Ant 1.6</em>.</td> | ||||
<td>1.4+</td> | <td>1.4+</td> | ||||
<td>No</td> | <td>No</td> | ||||
@@ -468,7 +469,7 @@ with the <var>exclude</var> patterns of the <code>packageset</code> (and vice ve | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>executable</td> | <td>executable</td> | ||||
<td>Specify a particular <code>javadoc</code> executable to use in place of the default binary | |||||
<td>Specify a particular <kbd>javadoc</kbd> executable to use in place of the default binary | |||||
(found in the same JDK as Ant is running in). <em>since Ant 1.6.3</em>.</td> | (found in the same JDK as Ant is running in). <em>since Ant 1.6.3</em>.</td> | ||||
<td>all</td> | <td>all</td> | ||||
<td>No</td> | <td>No</td> | ||||
@@ -514,7 +515,7 @@ recommended.</p> | |||||
<h4>packageset</h4> | <h4>packageset</h4> | ||||
<p>A <a href="../Types/dirset.html">DirSet</a>. All matched directories that contain Java source | <p>A <a href="../Types/dirset.html">DirSet</a>. All matched directories that contain Java source | ||||
files will be passed to <code>javadoc</code> as package names. Package names are created from the | |||||
files will be passed to <kbd>javadoc</kbd> as package names. Package names are created from the | |||||
directory names by translating the directory separator into dots. Ant assumes the base directory of | directory names by translating the directory separator into dots. Ant assumes the base directory of | ||||
the <code>packageset</code> points to the root of a package hierarchy.</p> | the <code>packageset</code> points to the root of a package hierarchy.</p> | ||||
@@ -524,14 +525,14 @@ attributes of the task have no effect on the nested <code><packageset></co | |||||
<h4>fileset</h4> | <h4>fileset</h4> | ||||
<p>A <a href="../Types/fileset.html">FileSet</a>. All matched files will be passed | <p>A <a href="../Types/fileset.html">FileSet</a>. All matched files will be passed | ||||
to <code>javadoc</code> as source files. Ant will automatically add the include | |||||
to <kbd>javadoc</kbd> as source files. Ant will automatically add the include | |||||
pattern <samp>**/*.java</samp> (and <samp>**/package.html</samp> | pattern <samp>**/*.java</samp> (and <samp>**/package.html</samp> | ||||
if <var>includenosourcepackages</var> is <q>true</q>) to these filesets.</p> | if <var>includenosourcepackages</var> is <q>true</q>) to these filesets.</p> | ||||
<p>Nested filesets can be used to document sources that are in the default package or if you want to | <p>Nested filesets can be used to document sources that are in the default package or if you want to | ||||
exclude certain files from documentation. If you want to document all source files and don't use | exclude certain files from documentation. If you want to document all source files and don't use | ||||
the default package, <code>packageset</code>s should be used instead as this increases performance | the default package, <code>packageset</code>s should be used instead as this increases performance | ||||
of <code>javadoc</code>.</p> | |||||
of <kbd>javadoc</kbd>.</p> | |||||
<p>The <var>packagenames</var>, <var>excludepackagenames</var> and <var>defaultexcludes</var> | <p>The <var>packagenames</var>, <var>excludepackagenames</var> and <var>defaultexcludes</var> | ||||
attributes of the task have no effect on the nested <code><fileset></code> elements.</p> | attributes of the task have no effect on the nested <code><fileset></code> elements.</p> | ||||
@@ -602,7 +603,7 @@ and set it to <q>true</q>.</p> | |||||
<p>Similar to <code><doctitle></code>.</p> | <p>Similar to <code><doctitle></code>.</p> | ||||
<h4>link</h4> | <h4>link</h4> | ||||
<p>Create link to <code>javadoc</code> output at the given URL. This performs the same role as | |||||
<p>Create link to <kbd>javadoc</kbd> output at the given URL. This performs the same role as | |||||
the <var>link</var> and <var>linkoffline</var> attributes. You can use either syntax (or both at | the <var>link</var> and <var>linkoffline</var> attributes. You can use either syntax (or both at | ||||
once), but with the nested elements you can easily specify multiple occurrences of the | once), but with the nested elements you can easily specify multiple occurrences of the | ||||
arguments.</p> | arguments.</p> | ||||
@@ -642,7 +643,7 @@ arguments.</p> | |||||
<td>If the <var>link</var> attribute is a relative file name, Ant will first try to locate the | <td>If the <var>link</var> attribute is a relative file name, Ant will first try to locate the | ||||
file relative to the current project's <var>basedir</var> and if it finds a file there use an | file relative to the current project's <var>basedir</var> and if it finds a file there use an | ||||
absolute URL for the <var>link</var> attribute, otherwise it will pass the file name verbatim | absolute URL for the <var>link</var> attribute, otherwise it will pass the file name verbatim | ||||
to the <code>javadoc</code> command.</td> | |||||
to the <kbd>javadoc</kbd> command.</td> | |||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -679,8 +680,8 @@ task.</p> | |||||
<h4>doclet</h4> | <h4>doclet</h4> | ||||
<p>The doclet nested element is used to specify | <p>The doclet nested element is used to specify | ||||
the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html" | the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html" | ||||
target="_top">doclet</a> that <code>javadoc</code> will use to process the input source files. A | |||||
number of the standard <code>javadoc</code> arguments are actually arguments of the standard | |||||
target="_top">doclet</a> that <kbd>javadoc</kbd> will use to process the input source files. A | |||||
number of the standard <kbd>javadoc</kbd> arguments are actually arguments of the standard | |||||
doclet. If these are specified in the <code>javadoc</code> task's attributes, they will be passed to | doclet. If these are specified in the <code>javadoc</code> task's attributes, they will be passed to | ||||
the doclet specified in the <code><doclet></code> nested element. Such attributes should only | the doclet specified in the <code><doclet></code> nested element. Such attributes should only | ||||
be specified, therefore, if they can be interpreted by the doclet in use.</p> | be specified, therefore, if they can be interpreted by the doclet in use.</p> | ||||
@@ -721,7 +722,7 @@ those tags.</p> | |||||
<td>description</td> | <td>description</td> | ||||
<td>Description for tag (e.g. <q>To do:</q>)</td> | <td>Description for tag (e.g. <q>To do:</q>)</td> | ||||
<td> | <td> | ||||
No, the <code>javadoc</code> executable will pick a default if this is not specified | |||||
No, the <kbd>javadoc</kbd> executable will pick a default if this is not specified | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -748,7 +749,7 @@ those tags.</p> | |||||
todo:a:To Do</pre> | todo:a:To Do</pre> | ||||
<strong>Note</strong>: The Javadoc reference quide has double quotes around the description | <strong>Note</strong>: The Javadoc reference quide has double quotes around the description | ||||
part of the definition. This will not work when used in a file, as the definition is quoted | part of the definition. This will not work when used in a file, as the definition is quoted | ||||
again when given to the <code>javadoc</code> program.<br/> | |||||
again when given to the <kbd>javadoc</kbd> program.<br/> | |||||
<strong>Note</strong>: If this attribute is specified, all the other attributes in this | <strong>Note</strong>: If this attribute is specified, all the other attributes in this | ||||
element will be ignored.</td> | element will be ignored.</td> | ||||
<td>No</td> | <td>No</td> | ||||
@@ -52,13 +52,13 @@ attribute:</p> | |||||
<li><q>gcjh</q>—the native standard compiler | <li><q>gcjh</q>—the native standard compiler | ||||
of <a href="https://gcc.gnu.org/gcc-7/changes.html#java" target="_top">gcj and | of <a href="https://gcc.gnu.org/gcc-7/changes.html#java" target="_top">gcj and | ||||
gij</a>. <em>Since Apache Ant 1.8.2</em></li> | gij</a>. <em>Since Apache Ant 1.8.2</em></li> | ||||
<li><q>forking</q>—runs the <code>javah</code> executable via its command line interface in | |||||
<li><q>forking</q>—runs the <kbd>javah</kbd> executable via its command line interface in | |||||
a separate process. Default when not running on Kaffe or gcj/gij <em>since Ant 1.9.8</em></li> | a separate process. Default when not running on Kaffe or gcj/gij <em>since Ant 1.9.8</em></li> | ||||
</ul> | </ul> | ||||
<p><strong>Note</strong>: if you are using this task to work on multiple files the command line may | <p><strong>Note</strong>: if you are using this task to work on multiple files the command line may | ||||
become too long on some operating systems. Unfortunately the <code>javah</code> command doesn't | |||||
support command argument files the way <code>javac</code> (for example) does, so all that can be | |||||
become too long on some operating systems. Unfortunately the <kbd>javah</kbd> command doesn't | |||||
support command argument files the way <kbd>javac</kbd> (for example) does, so all that can be | |||||
done is breaking the amount of classes to compile into smaller chunks.</p> | done is breaking the amount of classes to compile into smaller chunks.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -81,7 +81,7 @@ done is breaking the amount of classes to compile into smaller chunks.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>destdir</td> | <td>destdir</td> | ||||
<td class="left">sets the directory where <code>javah</code> saves the header files or the stub | |||||
<td class="left">sets the directory where <kbd>javah</kbd> saves the header files or the stub | |||||
files.</td> | files.</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -102,8 +102,7 @@ done is breaking the amount of classes to compile into smaller chunks.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>verbose</td> | <td>verbose</td> | ||||
<td>causes <code>Javah</code> to print a message concerning the status of the generated | |||||
files</td> | |||||
<td>causes <kbd>javah</kbd> to print a message concerning the status of the generated files</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -185,8 +184,8 @@ using one of the built-in compilers.</p> | |||||
<h4>Any nested element of a type that implements JavahAdapter</h4> | <h4>Any nested element of a type that implements JavahAdapter</h4> | ||||
<p><em>Since Ant 1.8.0</em></p> | <p><em>Since Ant 1.8.0</em></p> | ||||
<p>If a defined type implements the <code>JavahAdapter</code> interface a nested element of that | |||||
type can be used as an alternative to the <var>implementation</var> attribute.</p> | |||||
<p>If a defined type implements the <code class="code">JavahAdapter</code> interface a nested | |||||
element of that type can be used as an alternative to the <var>implementation</var> attribute.</p> | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<pre><javah destdir="c" class="org.foo.bar.Wibble"/></pre> | <pre><javah destdir="c" class="org.foo.bar.Wibble"/></pre> | ||||
@@ -220,11 +219,12 @@ already exist.</p> | |||||
<class name="org.foo.bar.Tribble"/> | <class name="org.foo.bar.Tribble"/> | ||||
</javah></pre> | </javah></pre> | ||||
<p>writes the headers for the three classes using the 'old' JNI format, then writes the | <p>writes the headers for the three classes using the 'old' JNI format, then writes the | ||||
corresponding <samp>.c</samp> stubs. The verbose option will cause <code>Javah</code> to describe | |||||
its progress.</p> | |||||
corresponding <samp>.c</samp> stubs. The <var>verbose</var> option will cause <code>Javah</code> to | |||||
describe its progress.</p> | |||||
<p>If you want to use a custom JavahAdapter <code>org.example.MyAdapter</code> you can either use | |||||
the implementation attribute:</p> | |||||
<p>If you want to use a | |||||
custom <code class="code">JavahAdapter</code> <code>org.example.MyAdapter</code> you can either use | |||||
the <var>implementation</var> attribute:</p> | |||||
<pre> | <pre> | ||||
<javah destdir="c" class="org.foo.bar.Wibble" | <javah destdir="c" class="org.foo.bar.Wibble" | ||||
implementation="org.example.MyAdapter"/></pre> | implementation="org.example.MyAdapter"/></pre> | ||||
@@ -82,7 +82,7 @@ default the task writes its report to the standard output.</p> | |||||
<td>jvm</td> | <td>jvm</td> | ||||
<td>The command used to invoke JVM. The command is resolved | <td>The command used to invoke JVM. The command is resolved | ||||
by <code>java.lang.Runtime.exec()</code>.</td> | by <code>java.lang.Runtime.exec()</code>.</td> | ||||
<td>No; default <q>java</q>, ignored if <var>fork</var> is <q>false</q></td> | |||||
<td>No; default <kbd>java</kbd>, ignored if <var>fork</var> is <q>false</q></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>dir</td> | <td>dir</td> | ||||
@@ -97,7 +97,7 @@ default the task writes its report to the standard output.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>classpathref</td> | <td>classpathref</td> | ||||
<td>the <var>classpath</var> to use, given as reference to a PATH defined elsewhere.</td> | |||||
<td>the <var>classpath</var> to use, given as reference to a path defined elsewhere.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -494,18 +494,18 @@ versions</h3> | |||||
</table> | </table> | ||||
<p id="footnote-1"><a href="#footnote-1-back"><strong>Note</strong></a>: When running JJTree with | <p id="footnote-1"><a href="#footnote-1-back"><strong>Note</strong></a>: When running JJTree with | ||||
the Ant <code>taskdef jjtree</code> the option <code>-OUTPUT_DIRECTORY</code> must always be set, | |||||
the Ant <code>taskdef jjtree</code> the option <kbd>-OUTPUT_DIRECTORY</kbd> must always be set, | |||||
because the project's <var>basedir</var> and the Ant working directory might differ. So even if you | because the project's <var>basedir</var> and the Ant working directory might differ. So even if you | ||||
don't specify the <var>outputdirectory</var> for <code>taskdef jjtree</code>, JJTree will be called | don't specify the <var>outputdirectory</var> for <code>taskdef jjtree</code>, JJTree will be called | ||||
with the <code>-OUTPUT_DIRECTORY</code> set to the project's <var>basedir</var>. But when | |||||
the <code>-OUTPUT_DIRECTORY</code> is set, the <code>-OUTPUT_FILE</code> setting is handled as if | |||||
relative to this <code>-OUTPUT_DIRECTORY</code>. Thus when the <code>-OUTPUT_FILE</code> is absolute | |||||
with the <kbd>-OUTPUT_DIRECTORY</kbd> set to the project's <var>basedir</var>. But when | |||||
the <kbd>-OUTPUT_DIRECTORY</kbd> is set, the <kbd>-OUTPUT_FILE</kbd> setting is handled as if | |||||
relative to this <kbd>-OUTPUT_DIRECTORY</kbd>. Thus when the <kbd>-OUTPUT_FILE</kbd> is absolute | |||||
or contains a drive letter we have a problem. Therefore absolute <var>outputfile</var>s (when | or contains a drive letter we have a problem. Therefore absolute <var>outputfile</var>s (when | ||||
the <var>outputdirectory</var> isn't specified) are made relative to the default directory. And for | the <var>outputdirectory</var> isn't specified) are made relative to the default directory. And for | ||||
this reason <var>outputfile</var>s that contain a drive letter can't be supported.</p> | this reason <var>outputfile</var>s that contain a drive letter can't be supported.</p> | ||||
<p>By the way: specifying a drive letter in the <code>-OUTPUT_FILE</code> when | |||||
the <code>-OUTPUT_DIRECTORY</code> is set, also results in strange behavior when running JJTree from | |||||
<p>By the way: specifying a drive letter in the <kbd>-OUTPUT_FILE</kbd> when | |||||
the <kbd>-OUTPUT_DIRECTORY</kbd> is set, also results in strange behavior when running JJTree from | |||||
the command line.</p> | the command line.</p> | ||||
</body> | </body> | ||||
@@ -38,7 +38,7 @@ Library Dependencies</a> for more information.</p> | |||||
in <code>ANT_HOME/lib</code>.</li> | in <code>ANT_HOME/lib</code>.</li> | ||||
<li>Do not put either in <code>ANT_HOME/lib</code>, and instead include their locations in | <li>Do not put either in <code>ANT_HOME/lib</code>, and instead include their locations in | ||||
your <code>CLASSPATH</code> environment variable.</li> | your <code>CLASSPATH</code> environment variable.</li> | ||||
<li>Add both JARs to your classpath using <code>-lib</code>.</li> | |||||
<li>Add both JARs to your classpath using <kbd>-lib</kbd>.</li> | |||||
<li>Specify the locations of both JARs using a <code><classpath></code> element in | <li>Specify the locations of both JARs using a <code><classpath></code> element in | ||||
a <code><taskdef></code> in the build file.</li> | a <code><taskdef></code> in the build file.</li> | ||||
<li>Leave <samp>ant-junit.jar</samp> in its default location in <code>ANT_HOME/lib</code> but | <li>Leave <samp>ant-junit.jar</samp> in its default location in <code>ANT_HOME/lib</code> but | ||||
@@ -129,7 +129,7 @@ for details.</p> | |||||
<td>jvm</td> | <td>jvm</td> | ||||
<td>The command used to invoke JVM. The command is resolved | <td>The command used to invoke JVM. The command is resolved | ||||
by <code>java.lang.Runtime.exec()</code>.</td> | by <code>java.lang.Runtime.exec()</code>.</td> | ||||
<td>No; default is <q>java</q>, ignored if <var>fork</var> is <q>false</q></td> | |||||
<td>No; default is <kbd>java</kbd>, ignored if <var>fork</var> is <q>false</q></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>dir</td> | <td>dir</td> | ||||
@@ -227,7 +227,7 @@ the following string patterns:</p> | |||||
<h3 id="nested">Parameters specified as nested elements</h3> | <h3 id="nested">Parameters specified as nested elements</h3> | ||||
<p>The <code><junit></code> task supports a nested <code><classpath></code> element that | <p>The <code><junit></code> task supports a nested <code><classpath></code> element that | ||||
represents a <a href="../using.html#path">PATH like structure</a>.</p> | |||||
represents a <a href="../using.html#path">path-like structure</a>.</p> | |||||
<p><em>Since Ant 1.7</em>, this classpath may be used to refer to <samp>junit.jar</samp> as well as | <p><em>Since Ant 1.7</em>, this classpath may be used to refer to <samp>junit.jar</samp> as well as | ||||
your tests and the tested code.</p> | your tests and the tested code.</p> | ||||
@@ -286,7 +286,7 @@ element's attributes, see the description in the <a href="../Tasks/exec.html#env | |||||
<p><em>Since Ant 1.6</em>.</p> | <p><em>Since Ant 1.6</em>.</p> | ||||
<p>The location of bootstrap class files can be specified using | <p>The location of bootstrap class files can be specified using | ||||
this <a href="../using.html#path">PATH like structure</a>—will be ignored if <var>fork</var> | |||||
this <a href="../using.html#path">path-like structure</a>—will be ignored if <var>fork</var> | |||||
is <q>false</q> or the target JVM doesn't support it (i.e. Java 1.1).</p> | is <q>false</q> or the target JVM doesn't support it (i.e. Java 1.1).</p> | ||||
<h4>permissions</h4> | <h4>permissions</h4> | ||||
@@ -312,7 +312,7 @@ an <a href="../Types/assertions.html"><code><assertions></code></a> subele | |||||
<p><em>Since Ant 1.9.8</em></p> | <p><em>Since Ant 1.9.8</em></p> | ||||
<p>The location of modules can be specified using this <a href="../using.html#path">PATH like | |||||
<p>The location of modules can be specified using this <a href="../using.html#path">path-like | |||||
structure</a>.<br/>The <code>modulepath</code> requires <var>fork</var> to be set to <q>true</q>. | structure</a>.<br/>The <code>modulepath</code> requires <var>fork</var> to be set to <q>true</q>. | ||||
<h4>upgrademodulepath</h4> | <h4>upgrademodulepath</h4> | ||||
@@ -320,7 +320,7 @@ structure</a>.<br/>The <code>modulepath</code> requires <var>fork</var> to be se | |||||
<p><em>Since Ant 1.9.8</em></p> | <p><em>Since Ant 1.9.8</em></p> | ||||
<p>The location of modules that replace upgradeable modules in the runtime image can be specified | <p>The location of modules that replace upgradeable modules in the runtime image can be specified | ||||
using this <a href="../using.html#path">PATH like | |||||
using this <a href="../using.html#path">path-like | |||||
structure</a>.<br/>The <code>upgrademodulepath</code> requires <var>fork</var> to be set | structure</a>.<br/>The <code>upgrademodulepath</code> requires <var>fork</var> to be set | ||||
to <q>true</q>.</p> | to <q>true</q>.</p> | ||||
@@ -335,15 +335,16 @@ of <code><test></code>.</p> | |||||
emits plain text. The formatter named <q>brief</q> will only print detailed information for test | emits plain text. The formatter named <q>brief</q> will only print detailed information for test | ||||
cases that failed, while <q>plain</q> gives a little statistics line for all test cases. Custom | cases that failed, while <q>plain</q> gives a little statistics line for all test cases. Custom | ||||
formatters that need to | formatters that need to | ||||
implement <code>org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter</code> can be | |||||
specified.</p> | |||||
implement <code class="code">org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter</code> | |||||
can be specified.</p> | |||||
<p>If you use the XML formatter, it may not include the same output that your tests have written as | <p>If you use the XML formatter, it may not include the same output that your tests have written as | ||||
some characters are illegal in XML documents and will be dropped.</p> | some characters are illegal in XML documents and will be dropped.</p> | ||||
<p>The fourth formatter named <q>failure</q> (<em>since Ant 1.8.0</em>) collects all | <p>The fourth formatter named <q>failure</q> (<em>since Ant 1.8.0</em>) collects all | ||||
failing <code>testXXX()</code> methods and creates a new <code>TestCase</code> which delegates only | |||||
these failing methods. The name and the location can be specified via Java System property or Ant | |||||
failing <code class="code">testXXX()</code> methods and creates a | |||||
new <code class="code">TestCase</code> which delegates only these failing methods. The name and the | |||||
location can be specified via Java system property or Ant | |||||
property <code>ant.junit.failureCollector</code>. The value has to point to the directory and the | property <code>ant.junit.failureCollector</code>. The value has to point to the directory and the | ||||
name of the resulting class (without suffix). It defaults | name of the resulting class (without suffix). It defaults | ||||
to <samp><i>java-tmp-dir</i>/FailedTests</samp>.</p> | to <samp><i>java-tmp-dir</i>/FailedTests</samp>.</p> | ||||
@@ -362,7 +363,7 @@ to <samp><i>java-tmp-dir</i>/FailedTests</samp>.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>classname</td> | <td>classname</td> | ||||
<td>Name of a custom formatter class.</td> | |||||
<td class="left">Name of a custom formatter class.</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>extension</td> | <td>extension</td> | ||||
@@ -480,14 +481,14 @@ to <samp><i>java-tmp-dir</i>/FailedTests</samp>.</p> | |||||
<tr> | <tr> | ||||
<td>skipNonTests</td> | <td>skipNonTests</td> | ||||
<td>Do not pass any classes that do not contain JUnit tests to the test runner. This prevents | <td>Do not pass any classes that do not contain JUnit tests to the test runner. This prevents | ||||
non tests from appearing as test errors in test results.<br/> Tests are identified by looking | |||||
non tests from appearing as test errors in test results.<br/>Tests are identified by looking | |||||
for the <code>@Test</code> annotation on any methods in concrete classes that don't | for the <code>@Test</code> annotation on any methods in concrete classes that don't | ||||
extend <code>junit.framework.TestCase</code>, or for public/protected methods with names | extend <code>junit.framework.TestCase</code>, or for public/protected methods with names | ||||
starting with <q>test</q> in concrete classes that | starting with <q>test</q> in concrete classes that | ||||
extend <code>junit.framework.TestCase</code>. Classes marked with the JUnit | extend <code>junit.framework.TestCase</code>. Classes marked with the JUnit | ||||
4 <code>org.junit.runner.RunWith</code> or <code>org.junit.runner.Suite.SuiteClasses</code> | 4 <code>org.junit.runner.RunWith</code> or <code>org.junit.runner.Suite.SuiteClasses</code> | ||||
annotations are also passed to JUnit for execution, as is any class with a public/protected | annotations are also passed to JUnit for execution, as is any class with a public/protected | ||||
no-argument <code>suite</code> method.</td> | |||||
no-argument <code>suite()</code> method.</td> | |||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -569,10 +570,11 @@ only <code><fileset></code> has been supported.</p> | |||||
non tests from appearing as test errors in test results.<br/>Tests are identified by looking | non tests from appearing as test errors in test results.<br/>Tests are identified by looking | ||||
for the <code>@Test</code> annotation on any methods in concrete classes that don't | for the <code>@Test</code> annotation on any methods in concrete classes that don't | ||||
extend <code>junit.framework.TestCase</code>, or for public/protected methods with names | extend <code>junit.framework.TestCase</code>, or for public/protected methods with names | ||||
starting with 'test' in concrete classes that extend <code>junit.framework.TestCase</code>. | |||||
Classes marked with the JUnit4 <code>org.junit.runner.RunWith</code> | |||||
or <code>org.junit.runner.Suite.SuiteClasses</code> annotations are also passed to JUnit for | |||||
execution, as is any class with a public/protected no-argument <code>suite</code> method.</td> | |||||
starting with <q>test</q> in concrete classes that | |||||
extend <code>junit.framework.TestCase</code>. Classes marked with the JUnit | |||||
4 <code>org.junit.runner.RunWith</code> or <code>org.junit.runner.Suite.SuiteClasses</code> | |||||
annotations are also passed to JUnit for execution, as is any class with a public/protected | |||||
no-argument <code>suite()</code> method.</td> | |||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -583,25 +585,26 @@ elements.</p> | |||||
<h3>Forked tests and <code>tearDown()</code></h3> | <h3>Forked tests and <code>tearDown()</code></h3> | ||||
<p>If a forked test runs into a timeout, Ant will terminate the JVM process it has created, which | <p>If a forked test runs into a timeout, Ant will terminate the JVM process it has created, which | ||||
probably means the test's <code>tearDown()</code> method will never be called. The same is true if | |||||
the forked JVM crashes for some other reason.</p> | |||||
probably means the test's <code class="code">tearDown()</code> method will never be called. The | |||||
same is true if the forked JVM crashes for some other reason.</p> | |||||
<p><em>Since Ant 1.8.0</em>, a special formatter is distributed with Ant that tries to load the | <p><em>Since Ant 1.8.0</em>, a special formatter is distributed with Ant that tries to load the | ||||
testcase that was in the forked JVM and invoke that class' <code>tearDown()</code> method. This | |||||
formatter has the following limitations:</p> | |||||
testcase that was in the forked JVM and invoke that class' <code class="code">tearDown()</code> | |||||
method. This formatter has the following limitations:</p> | |||||
<ul> | <ul> | ||||
<li>It runs in the same JVM as Ant itself, this is a different JVM than the one that was executing | <li>It runs in the same JVM as Ant itself, this is a different JVM than the one that was executing | ||||
the test and it may see a different classloader (and thus may be unable to load the test | the test and it may see a different classloader (and thus may be unable to load the test | ||||
class).</li> | class).</li> | ||||
<li>It cannot determine which test was run when the timeout/crash occurred if the forked JVM was | <li>It cannot determine which test was run when the timeout/crash occurred if the forked JVM was | ||||
running multiple test. I.e. the formatter cannot work with any <var>forkMode</var> other | |||||
than <q>perTest</q> and it won't do anything if the test class contains a <code>suite()</code> | |||||
method.</li> | |||||
running multiple tests. I.e. the formatter cannot work with any <var>forkMode</var> other | |||||
than <q>perTest</q> and it won't do anything if the test class contains | |||||
a <code class="code">suite()</code> method.</li> | |||||
</ul> | </ul> | ||||
<p>If the formatter recognizes an incompatible <var>forkMode</var> or a <code>suite</code> method or | |||||
fails to load the test class it will silently do nothing.</p> | |||||
<p>If the formatter recognizes an incompatible <var>forkMode</var> or | |||||
a <code class="code">suite()</code> method or fails to load the test class it will silently do | |||||
nothing.</p> | |||||
<p>The formatter doesn't have any effect on tests that were not forked or didn't cause timeouts or | <p>The formatter doesn't have any effect on tests that were not forked or didn't cause timeouts or | ||||
JVM crashes.</p> | JVM crashes.</p> | ||||
@@ -734,11 +737,11 @@ updating the collector class.</p> | |||||
the <code>platform.java</code> property. The JUnit library is a part of an unnamed module while the | the <code>platform.java</code> property. The JUnit library is a part of an unnamed module while the | ||||
tested project and required modules are on the module path. The tests do not have module-info file | tested project and required modules are on the module path. The tests do not have module-info file | ||||
and are executed in the project module given by <code>module.name</code> property.<br/> | and are executed in the project module given by <code>module.name</code> property.<br/> | ||||
The <code>--patch-module</code> Java option executes the tests built | |||||
The <kbd>--patch-module</kbd> Java option executes the tests built | |||||
into <samp>${build.test.classes}</samp> in a module given by <code>module.name</code> property.<br/> | into <samp>${build.test.classes}</samp> in a module given by <code>module.name</code> property.<br/> | ||||
The <code>--add-modules</code> Java option enables the tested module.<br/> | |||||
The <code>--add-reads</code> Java option makes the unnamed module containing JUnit readable by | |||||
tested module.<br/> The <code>--add-exports</code> Java option makes the non-exported test | |||||
The <kbd>--add-modules</kbd> Java option enables the tested module.<br/> | |||||
The <kbd>--add-reads</kbd> Java option makes the unnamed module containing JUnit readable by | |||||
tested module.<br/> The <kbd>--add-exports</kbd> Java option makes the non-exported test | |||||
package <code>my.test</code> accessible from the unnamed module containing JUnit.</p> | package <code>my.test</code> accessible from the unnamed module containing JUnit.</p> | ||||
<pre> | <pre> | ||||
<junit fork="true" | <junit fork="true" | ||||
@@ -754,8 +757,8 @@ package <code>my.test</code> accessible from the unnamed module containing JUnit | |||||
</pre> | </pre> | ||||
<p>Runs <code>my.test.TestCase</code> as a black-box test in the forked JVM given by | <p>Runs <code>my.test.TestCase</code> as a black-box test in the forked JVM given by | ||||
the <code>platform.java</code> property. The JUnit library is used as an automatic module. The | the <code>platform.java</code> property. The JUnit library is used as an automatic module. The | ||||
tests' module-info requires the tested module and JUnit.<br/> The <code>--add-modules</code> Java | |||||
option enables the test module.<br/> The <code>--add-exports</code> Java option makes the | |||||
tests' module-info requires the tested module and JUnit.<br/> The <kbd>--add-modules</kbd> Java | |||||
option enables the test module.<br/> The <kbd>--add-exports</kbd> Java option makes the | |||||
non-exported test package <code>my.test</code> accessible from the JUnit module and Ant's test | non-exported test package <code>my.test</code> accessible from the JUnit module and Ant's test | ||||
runner. Another possibility is to export the test package in the tests' module-info | runner. Another possibility is to export the test package in the tests' module-info | ||||
by <code>exports my.test</code> directive.</p> | by <code>exports my.test</code> directive.</p> | ||||
@@ -60,7 +60,7 @@ is not set.</p> | |||||
<tr> | <tr> | ||||
<td>quiet</td> | <td>quiet</td> | ||||
<td>Do not display a diagnostic message (unless Apache Ant has been invoked with | <td>Do not display a diagnostic message (unless Apache Ant has been invoked with | ||||
the <code>-verbose</code> or <code>-debug</code> switches) or modify the exit status to | |||||
the <kbd>-verbose</kbd> or <kbd>-debug</kbd> switches) or modify the exit status to | |||||
reflect an error. Setting this to <q>true</q> implies setting <var>failonerror</var> | reflect an error. Setting this to <q>true</q> implies setting <var>failonerror</var> | ||||
to <q>false</q>. <em>Since Ant 1.7.0</em>. | to <q>false</q>. <em>Since Ant 1.7.0</em>. | ||||
</td> | </td> | ||||
@@ -61,7 +61,7 @@ the property is not set.</p> | |||||
<tr> | <tr> | ||||
<td>quiet</td> | <td>quiet</td> | ||||
<td>Do not display a diagnostic message (unless Ant has been invoked with | <td>Do not display a diagnostic message (unless Ant has been invoked with | ||||
the <code>-verbose</code> or <code>-debug</code> switches) or modify the exit status to | |||||
the <kbd>-verbose</kbd> or <kbd>-debug</kbd> switches) or modify the exit status to | |||||
reflect an error. Setting this to <q>true</q> implies setting <var>failonerror</var> | reflect an error. Setting this to <q>true</q> implies setting <var>failonerror</var> | ||||
to <q>false</q>.</td> | to <q>false</q>.</td> | ||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
@@ -73,7 +73,7 @@ examples section.</p> | |||||
<p>outputs</p> | <p>outputs</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
step1: | step1: | ||||
[echo] Before local: foo is foo | [echo] Before local: foo is foo | ||||
[echo] After local: foo is bar | [echo] After local: foo is bar | ||||
@@ -110,7 +110,7 @@ remainder of the target <q>step1</q>.</p> | |||||
<p>outputs something similar to</p> | <p>outputs something similar to</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
[echo] global 3: foo is foo | [echo] global 3: foo is foo | ||||
[echo] global 1: foo is foo | [echo] global 1: foo is foo | ||||
[echo] First sequential: foo is bar.1 | [echo] First sequential: foo is bar.1 | ||||
@@ -186,7 +186,7 @@ | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<p>The following example defined a task called testing and runs it.</p> | <p>The following example defined a task called testing and runs it.</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<macrodef name="testing"> | <macrodef name="testing"> | ||||
<attribute name="v" default="NOT SET"/> | <attribute name="v" default="NOT SET"/> | ||||
<element name="some-tasks" optional="yes"/> | <element name="some-tasks" optional="yes"/> | ||||
@@ -206,7 +206,7 @@ | |||||
element <code>cc-elements</code>. The body of the task uses the <code><cc></code> task | element <code>cc-elements</code>. The body of the task uses the <code><cc></code> task | ||||
from the <a href="http://ant-contrib.sourceforge.net/" target="_top">ant-contrib</a> | from the <a href="http://ant-contrib.sourceforge.net/" target="_top">ant-contrib</a> | ||||
project.</p> | project.</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<macrodef name="call-cc"> | <macrodef name="call-cc"> | ||||
<attribute name="target"/> | <attribute name="target"/> | ||||
<attribute name="link"/> | <attribute name="link"/> | ||||
@@ -223,7 +223,7 @@ | |||||
</sequential> | </sequential> | ||||
</macrodef></pre> | </macrodef></pre> | ||||
<p>This then can be used as follows:</p> | <p>This then can be used as follows:</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<call-cc target="unittests" link="executable" | <call-cc target="unittests" link="executable" | ||||
target.dir="${build.bin.dir}"> | target.dir="${build.bin.dir}"> | ||||
<cc-elements> | <cc-elements> | ||||
@@ -234,9 +234,10 @@ | |||||
<linker refid="linker-libs"/> | <linker refid="linker-libs"/> | ||||
</cc-elements> | </cc-elements> | ||||
</call-cc></pre> | </call-cc></pre> | ||||
<p>The following fragment shows <call-cc>, but this time using an implicit element and | |||||
with the <var>link</var> and <var>target.dir</var> arguments having default values.</p> | |||||
<pre class="code"> | |||||
<p>The following fragment shows <code><call-cc></code>, but this time using an implicit | |||||
element and with the <var>link</var> and <var>target.dir</var> arguments having default | |||||
values.</p> | |||||
<pre> | |||||
<macrodef name="call-cc"> | <macrodef name="call-cc"> | ||||
<attribute name="target"/> | <attribute name="target"/> | ||||
<attribute name="link" default="executable"/> | <attribute name="link" default="executable"/> | ||||
@@ -252,8 +253,9 @@ | |||||
</cc> | </cc> | ||||
</sequential> | </sequential> | ||||
</macrodef></pre> | </macrodef></pre> | ||||
<p>This then can be used as follows, note that <cc-elements> is not specified.</p> | |||||
<pre class="code"> | |||||
<p>This then can be used as follows, note that <code><cc-elements></code> is not | |||||
specified.</p> | |||||
<pre> | |||||
<call-cc target="unittests"> | <call-cc target="unittests"> | ||||
<includepath location="${gen.dir}"/> | <includepath location="${gen.dir}"/> | ||||
<includepath location="test"/> | <includepath location="test"/> | ||||
@@ -263,7 +265,7 @@ | |||||
</call-cc> | </call-cc> | ||||
</pre> | </pre> | ||||
<p>The following shows the use of the <code>text</code> element.</p> | <p>The following shows the use of the <code>text</code> element.</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<macrodef name="echotest"> | <macrodef name="echotest"> | ||||
<text name="text"/> | <text name="text"/> | ||||
<sequential> | <sequential> | ||||
@@ -275,10 +277,10 @@ | |||||
</echotest> | </echotest> | ||||
</pre> | </pre> | ||||
<p>The following uses a prior defined attribute for setting the default value of another. The | <p>The following uses a prior defined attribute for setting the default value of another. The | ||||
output would be <code>one=test two=test</code>. If you change the order of lines *1 and *2 the | |||||
output would be <code>one=test two=@{one}</code>, because while processing | |||||
the <var>two</var>-line the value for <var>one</var> is not set.</p> | |||||
<pre class="code"> | |||||
output would be <code class="output">one=test two=test</code>. If you change the order of | |||||
lines *1 and *2 the output would be <code class="output">one=test two=@{one}</code>, because | |||||
while processing the <var>two</var>-line the value for <var>one</var> is not set.</p> | |||||
<pre> | |||||
<macrodef name="test"> | <macrodef name="test"> | ||||
<attribute name="one"/> <strong>*1</strong> | <attribute name="one"/> <strong>*1</strong> | ||||
<attribute name="two" default="@{one}"/> <strong>*2</strong> | <attribute name="two" default="@{one}"/> <strong>*2</strong> | ||||
@@ -31,8 +31,8 @@ property. Useful when setting up RMI or JNLP codebases, for example. Nested fi | |||||
supported; if present, these are turned into the URLs with the supplied <var>separator</var> between | supported; if present, these are turned into the URLs with the supplied <var>separator</var> between | ||||
them.</p> | them.</p> | ||||
<h3 id="attributes">Parameters</h3> | <h3 id="attributes">Parameters</h3> | ||||
<table> | |||||
<tr class="attr"> | |||||
<table class="attr"> | |||||
<tr> | |||||
<th>Attribute</th> | <th>Attribute</th> | ||||
<th>Description</th> | <th>Description</th> | ||||
<th>Type</th> | <th>Type</th> | ||||
@@ -75,7 +75,9 @@ them.</p> | |||||
<pre><makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/></pre> | <pre><makeurl file="${user.home}/.m2/repository" property="m2.repository.url"/></pre> | ||||
<p>Sets the property <code>m2.repository.url</code> to the file: URL of the local Maven2 | <p>Sets the property <code>m2.repository.url</code> to the file: URL of the local Maven2 | ||||
repository.</p> | repository.</p> | ||||
<pre><makeurl property="codebase"><fileset dir="lib includes="*.jar"/></makeurl></pre> | |||||
<pre><makeurl property="codebase"> | |||||
<fileset dir="lib includes="*.jar"/> | |||||
</makeurl></pre> | |||||
<p>Set the property <code>codebase</code> to the three URLs of the files provided as nested | <p>Set the property <code>codebase</code> to the three URLs of the files provided as nested | ||||
elements.</p> | elements.</p> | ||||
</body> | </body> | ||||
@@ -89,10 +89,10 @@ This classpath must not be empty, and is required.</p> | |||||
jarfile="build/acme.jar"> | jarfile="build/acme.jar"> | ||||
<classpath refid="classpath"/> | <classpath refid="classpath"/> | ||||
</manifestclasspath></pre> | </manifestclasspath></pre> | ||||
<p>Assuming a path of id <q>classpath</q> was already defined, convert this path relatively to | |||||
the <samp>build/</samp> directory that will contain <samp>acme.jar</samp>, which can later be | |||||
created with <code><jar></code> with a nested <code><manifest></code> element that lists | |||||
an <code><attribute name="Class-Path" value="${jar.classpath}"/></code>.</p> | |||||
<p>Assuming a path with <var>id</var> <q>classpath</q> was already defined, convert this path | |||||
relatively to the <samp>build/</samp> directory that will contain <samp>acme.jar</samp>, which can | |||||
later be created with <code><jar></code> with a nested <code><manifest></code> element | |||||
that lists an <code><attribute name="Class-Path" value="${jar.classpath}"/></code>.</p> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -31,7 +31,7 @@ the destination file is overwritten if it already exists. When <var>overwrite</ | |||||
then files are only moved if the source file is newer than the destination file, or when the | then files are only moved if the source file is newer than the destination file, or when the | ||||
destination file does not exist.</p> | destination file does not exist.</p> | ||||
<p><a href="../Types/resources.html#collection">resource collections</a> are used to select a group | |||||
<p><a href="../Types/resources.html#collection">Resource collections</a> are used to select a group | |||||
of files to move. Only file system based resource collections are supported, this | of files to move. Only file system based resource collections are supported, this | ||||
includes <a href="../Types/fileset.html">fileset</a>s, <a href="../Types/filelist.html">filelist</a> | includes <a href="../Types/fileset.html">fileset</a>s, <a href="../Types/filelist.html">filelist</a> | ||||
and <a href="../using.html#path">path</a>. Prior to Apache Ant 1.7 | and <a href="../using.html#path">path</a>. Prior to Apache Ant 1.7 | ||||
@@ -52,7 +52,7 @@ | |||||
<ul> | <ul> | ||||
<li><q>default</q>—the default converter for the platform: kaffe when run on Kaffe, | <li><q>default</q>—the default converter for the platform: kaffe when run on Kaffe, | ||||
builtin otherwise.</li> | builtin otherwise.</li> | ||||
<li><q>sun</q>—used to be the standard converter of the JDK < 9</li> | |||||
<li><q>sun</q>—used to be the standard converter of the JDK 8 or earlier</li> | |||||
<li><q>kaffe</q>—the standard converter of <a href="http://www.kaffe.org" | <li><q>kaffe</q>—the standard converter of <a href="http://www.kaffe.org" | ||||
target="_top">Kaffe</a></li> | target="_top">Kaffe</a></li> | ||||
<li><q>builtin</q>—Ant's internal implementation. <em>Since Ant 1.9.8</em></li> | <li><q>builtin</q>—Ant's internal implementation. <em>Since Ant 1.9.8</em></li> | ||||
@@ -66,7 +66,7 @@ | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>reverse</td> | <td>reverse</td> | ||||
<td>Reverse the sense of the conversion, i.e. convert from ASCII to native <strong>only | |||||
<td>Reverse the sense of the conversion, i.e. convert from ASCII to native<br/><strong>Only | |||||
supported by the <q>sun</q> and <q>builtin</q> converters</strong></td> | supported by the <q>sun</q> and <q>builtin</q> converters</strong></td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -169,8 +169,8 @@ using one of the built-in converters.</p> | |||||
<h4>Any nested element of a type that implements Native2AsciiAdapter</h4> | <h4>Any nested element of a type that implements Native2AsciiAdapter</h4> | ||||
<p><em>Since Ant 1.8.0</em></p> | <p><em>Since Ant 1.8.0</em></p> | ||||
<p>If a defined type implements the <code>Native2AsciiAdapter</code> interface a nested element of | |||||
that type can be used as an alternative to the <var>implementation</var> attribute.</p> | |||||
<p>If a defined type implements the <code class="code">Native2AsciiAdapter</code> interface a nested | |||||
element of that type can be used as an alternative to the <var>implementation</var> attribute.</p> | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
@@ -189,8 +189,9 @@ EUCJIS encoding to ASCII and renames them to end in <samp>.java</samp>.</p> | |||||
to ASCII, placing the results in the directory <samp>src</samp>. The names of the files remain the | to ASCII, placing the results in the directory <samp>src</samp>. The names of the files remain the | ||||
same.</p> | same.</p> | ||||
<p>If you want to use a custom Native2AsciiAdapter <code>org.example.MyAdapter</code> you can either | |||||
use the implementation attribute:</p> | |||||
<p>If you want to use a | |||||
custom <code class="code">Native2AsciiAdapter</code> <code>org.example.MyAdapter</code> you can | |||||
either use the implementation attribute:</p> | |||||
<pre> | <pre> | ||||
<native2ascii encoding="EUCJIS" src="srcdir" dest="srcdir" | <native2ascii encoding="EUCJIS" src="srcdir" dest="srcdir" | ||||
includes="**/*.eucjis" ext=".java" | includes="**/*.eucjis" ext=".java" | ||||
@@ -203,8 +204,8 @@ use the implementation attribute:</p> | |||||
includes="**/*.eucjis" ext=".java"> | includes="**/*.eucjis" ext=".java"> | ||||
<myadapter/> | <myadapter/> | ||||
</native2ascii></pre> | </native2ascii></pre> | ||||
<p>in which case your native2ascii adapter can support attributes and nested elements of its | |||||
own.</p> | |||||
<p>in which case your <code>native2ascii</code> adapter can support attributes and nested elements | |||||
of its own.</p> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -50,8 +50,9 @@ nested <code><include></code>, <code><exclude></code> | |||||
and <code><patternset></code> elements.</p> | and <code><patternset></code> elements.</p> | ||||
<p>All attributes except <var>classpath</var>, <var>srcdir</var> and <var>destDir</var> are also | <p>All attributes except <var>classpath</var>, <var>srcdir</var> and <var>destDir</var> are also | ||||
available as properties in the form <code>ant.netrexxc.<i>attributename</i></code>, | available as properties in the form <code>ant.netrexxc.<i>attributename</i></code>, | ||||
eg.<br/><code><property name="ant.netrexxc.verbose" value="noverbose"/></code><br/> or from the | |||||
command line as<br/><code>ant -Dant.netrexxc.verbose=noverbose ...</code></p> | |||||
eg.<br/><code class="code"><property name="ant.netrexxc.verbose" | |||||
value="noverbose"/></code><br/> or from the command line as<br/><kbd>ant | |||||
-Dant.netrexxc.verbose=noverbose ...</kbd></p> | |||||
<p><strong>Note</strong>: This task depends on external libraries not included in the Apache Ant | <p><strong>Note</strong>: This task depends on external libraries not included in the Apache Ant | ||||
distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a> for more | distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a> for more | ||||
information.</p> | information.</p> | ||||
@@ -174,7 +175,7 @@ information.</p> | |||||
<td>removeKeepExtension</td> | <td>removeKeepExtension</td> | ||||
<td>Tells whether the trailing <samp>.keep</samp> in <var>compile</var>=<q>false</q> mode should | <td>Tells whether the trailing <samp>.keep</samp> in <var>compile</var>=<q>false</q> mode should | ||||
be removed so that the resulting Java source file really ends on <samp>.java</samp>. This | be removed so that the resulting Java source file really ends on <samp>.java</samp>. This | ||||
facilitates the use of the <code>javadoc</code> tool later on.</td> | |||||
facilitates the use of the <kbd>javadoc</kbd> tool later on.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -100,7 +100,7 @@ is not set, the remaining tasks in other threads will continue to run until all | |||||
completed. In this situation, the <code>parallel</code> task will also fail.</p> | completed. In this situation, the <code>parallel</code> task will also fail.</p> | ||||
<p>The <code>parallel</code> task may be combined with the <a href="sequential.html">sequential</a> | <p>The <code>parallel</code> task may be combined with the <a href="sequential.html">sequential</a> | ||||
task to define sequences of tasks to be executed on each thread within the parallel block</p> | |||||
task to define sequences of tasks to be executed on each thread within the parallel block.</p> | |||||
<p>The <var>threadCount</var> attribute can be used to place a maximum number of available threads | <p>The <var>threadCount</var> attribute can be used to place a maximum number of available threads | ||||
for the execution. When not present all child tasks will be executed at once. When present then | for the execution. When not present all child tasks will be executed at once. When present then | ||||
@@ -125,9 +125,9 @@ occur. This is not a replacement for Java Language level thread semantics and i | |||||
<h4>daemons</h4> | <h4>daemons</h4> | ||||
<p>The <code>parallel</code> task supports a <code><daemons></code> nested element. This is a | <p>The <code>parallel</code> task supports a <code><daemons></code> nested element. This is a | ||||
list of tasks which are to be run in parallel daemon threads. The parallel task will not wait for | |||||
these tasks to complete. Being daemon threads, however, they will not prevent Ant from completing, | |||||
whereupon the threads are terminated. Failures in daemon threads which occur before | |||||
list of tasks which are to be run in parallel daemon threads. The <code>parallel</code> task will | |||||
not wait for these tasks to complete. Being daemon threads, however, they will not prevent Ant from | |||||
completing, whereupon the threads are terminated. Failures in daemon threads which occur before | |||||
the <code>parallel</code> task itself finishes will be reported and can cause <code>parallel</code> | the <code>parallel</code> task itself finishes will be reported and can cause <code>parallel</code> | ||||
to throw an exception. Failures which occur after <code>parallel</code> has completed are not | to throw an exception. Failures which occur after <code>parallel</code> has completed are not | ||||
reported.</p> | reported.</p> | ||||
@@ -166,7 +166,7 @@ the build. In this instance, some servlets are being compiled in one thread and | |||||
being precompiled in another. Developers need to be careful that the two tasks are independent, both | being precompiled in another. Developers need to be careful that the two tasks are independent, both | ||||
in terms of their dependencies and in terms of their potential interactions in Ant's external | in terms of their dependencies and in terms of their potential interactions in Ant's external | ||||
environment. Here we set <var>fork</var>=<q>true</q> for the <code><javac></code> task, so | environment. Here we set <var>fork</var>=<q>true</q> for the <code><javac></code> task, so | ||||
that it runs in a new process; if the <code><wljspc></code> task used the <code>javac</code> | |||||
that it runs in a new process; if the <code><wljspc></code> task used the <kbd>javac</kbd> | |||||
compiler in-VM (it may), concurrency problems may arise.</p> | compiler in-VM (it may), concurrency problems may arise.</p> | ||||
<pre> | <pre> | ||||
@@ -26,7 +26,7 @@ | |||||
<h2 id="patch">Patch</h2> | <h2 id="patch">Patch</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Applies a diff file to originals. Requires <code>patch</code> to be on the execution path.</p> | |||||
<p>Applies a diff file to originals. Requires <kbd>patch</kbd> to be on the execution path.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -140,7 +140,7 @@ value <samp>/weblogic</samp>.</p> | |||||
</pathconvert></pre> | </pathconvert></pre> | ||||
<p>will generate the path shown below and store it in the property | <p>will generate the path shown below and store it in the property | ||||
named <code>wl.path.unix</code>.</p> | named <code>wl.path.unix</code>.</p> | ||||
<pre>/weblogic/lib/weblogicaux.jar:/weblogic/classes:/weblogic/mssqlserver4/classes:/WINNT/SYSTEM32</pre> | |||||
<pre class="output">/weblogic/lib/weblogicaux.jar:/weblogic/classes:/weblogic/mssqlserver4/classes:/WINNT/SYSTEM32</pre> | |||||
<h4>Example 2</h4> | <h4>Example 2</h4> | ||||
<p>Given a FileList defined as:</p> | <p>Given a FileList defined as:</p> | ||||
@@ -154,7 +154,7 @@ named <code>wl.path.unix</code>.</p> | |||||
<map from="${env.HOME}" to="/usr/local"/> | <map from="${env.HOME}" to="/usr/local"/> | ||||
</pathconvert></pre> | </pathconvert></pre> | ||||
<p>will convert the list of files to the following Unix path:</p> | <p>will convert the list of files to the following Unix path:</p> | ||||
<pre>/usr/local/ant/lib/njavac.jar:/usr/local/ant/lib/xproperty.jar</pre> | |||||
<pre class="output">/usr/local/ant/lib/njavac.jar:/usr/local/ant/lib/xproperty.jar</pre> | |||||
<h4>Example 3</h4> | <h4>Example 3</h4> | ||||
<pre> | <pre> | ||||
@@ -60,7 +60,7 @@ | |||||
the <var>debug</var>, <var>deprecation</var>, <var>srcdir</var> and <var>destdir</var> | the <var>debug</var>, <var>deprecation</var>, <var>srcdir</var> and <var>destdir</var> | ||||
attributes set. It also has a <code>src</code> element to source files from a generated | attributes set. It also has a <code>src</code> element to source files from a generated | ||||
directory.</p> | directory.</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<presetdef name="my.javac"> | <presetdef name="my.javac"> | ||||
<javac debug="${debug}" deprecation="${deprecation}" | <javac debug="${debug}" deprecation="${deprecation}" | ||||
srcdir="${src.dir}" destdir="${classes.dir}"> | srcdir="${src.dir}" destdir="${classes.dir}"> | ||||
@@ -68,13 +68,13 @@ | |||||
</javac> | </javac> | ||||
</presetdef></pre> | </presetdef></pre> | ||||
<p>This can be used as a normal <code>javac</code> task—for example:</p> | <p>This can be used as a normal <code>javac</code> task—for example:</p> | ||||
<pre class="code"><my.javac/></pre> | |||||
<pre><my.javac/></pre> | |||||
<p>The attributes specified in the preset task may be overridden—i.e. they may be seen as | <p>The attributes specified in the preset task may be overridden—i.e. they may be seen as | ||||
optional attributes—for example:</p> | optional attributes—for example:</p> | ||||
<pre class="code"><my.javac srcdir="${test.src}" deprecation="no"/></pre> | |||||
<pre><my.javac srcdir="${test.src}" deprecation="no"/></pre> | |||||
<p>One may put a <code>presetdef</code> definition in an antlib. For example suppose the jar | <p>One may put a <code>presetdef</code> definition in an antlib. For example suppose the jar | ||||
file <samp>antgoodies.jar</samp> has the <samp>antlib.xml</samp> as follows:</p> | file <samp>antgoodies.jar</samp> has the <samp>antlib.xml</samp> as follows:</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<antlib> | <antlib> | ||||
<taskdef resource="com/acme/antgoodies/tasks.properties"/> | <taskdef resource="com/acme/antgoodies/tasks.properties"/> | ||||
<!-- Implement the common use of the javac command --> | <!-- Implement the common use of the javac command --> | ||||
@@ -84,7 +84,7 @@ | |||||
</presetdef> | </presetdef> | ||||
</antlib></pre> | </antlib></pre> | ||||
<p>One may then use this in a build file as follows:</p> | <p>One may then use this in a build file as follows:</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<project default="example" xmlns:antgoodies="antlib:com.acme.antgoodies"> | <project default="example" xmlns:antgoodies="antlib:com.acme.antgoodies"> | ||||
<target name="example"> | <target name="example"> | ||||
<!-- Compile source --> | <!-- Compile source --> | ||||
@@ -94,7 +94,7 @@ | |||||
</target> | </target> | ||||
</project></pre> | </project></pre> | ||||
<p>The following is an example of evaluation of properties when the definition is used:</p> | <p>The following is an example of evaluation of properties when the definition is used:</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<target name="defineandcall"> | <target name="defineandcall"> | ||||
<presetdef name="showmessage"> | <presetdef name="showmessage"> | ||||
<echo>message is '${message}'</echo> | <echo>message is '${message}'</echo> | ||||
@@ -109,8 +109,8 @@ | |||||
<target name="called"> | <target name="called"> | ||||
<showmessage/> | <showmessage/> | ||||
</target></pre> | </target></pre> | ||||
<p>The command <code>ant defineandcall</code> results in the output:</p> | |||||
<pre class="code"> | |||||
<p>The command <kbd>ant defineandcall</kbd> results in the output:</p> | |||||
<pre class="output"> | |||||
defineandcall: | defineandcall: | ||||
[showmessage] message is '${message}' | [showmessage] message is '${message}' | ||||
[showmessage] message is 'Message 1' | [showmessage] message is 'Message 1' | ||||
@@ -120,7 +120,7 @@ called: | |||||
<p>It is possible to use a trick to evaluate properties when the definition is <em>made</em> | <p>It is possible to use a trick to evaluate properties when the definition is <em>made</em> | ||||
rather than used. This can be useful if you do not expect some properties to be available in | rather than used. This can be useful if you do not expect some properties to be available in | ||||
child builds run with <code><ant ... inheritall="false"></code>:</p> | child builds run with <code><ant ... inheritall="false"></code>:</p> | ||||
<pre class="code"> | |||||
<pre> | |||||
<macrodef name="showmessage-presetdef"> | <macrodef name="showmessage-presetdef"> | ||||
<attribute name="messageval"/> | <attribute name="messageval"/> | ||||
<presetdef name="showmessage"> | <presetdef name="showmessage"> | ||||
@@ -36,12 +36,13 @@ information.</p> | |||||
<h3>Parameters specified as nested elements</h3> | <h3>Parameters specified as nested elements</h3> | ||||
<p>You may specify many configured <code>org.apache.tools.ant.ProjectHelper</code> instances.</p> | |||||
<p>You may specify many configured <code class="code">org.apache.tools.ant.ProjectHelper</code> | |||||
instances.</p> | |||||
<h3>Example</h3> | <h3>Example</h3> | ||||
<p>Install a custom ProjectHelper implementation (assuming <code>MyProjectHelper extends | |||||
ProjectHelper</code>):</p> | |||||
<p>Install a custom ProjectHelper implementation (assuming <code class="code">MyProjectHelper | |||||
extends ProjectHelper</code>):</p> | |||||
<pre> | <pre> | ||||
<typedef classname="org.example.MyProjectHelper" | <typedef classname="org.example.MyProjectHelper" | ||||
@@ -38,11 +38,11 @@ they are most definitely not variables.</p> | |||||
<li>By supplying both the <var>name</var> and <var>refid</var> attributes.</li> | <li>By supplying both the <var>name</var> and <var>refid</var> attributes.</li> | ||||
<li>By setting the <var>file</var> attribute with the filename of the property file to load. This | <li>By setting the <var>file</var> attribute with the filename of the property file to load. This | ||||
property file has the format as defined by the file used in the | property file has the format as defined by the file used in the | ||||
class <code>java.util.Properties</code>, with the same rules about how non-ISO-8859-1 characters | |||||
must be escaped.</li> | |||||
class <code class="code">java.util.Properties</code>, with the same rules about how | |||||
non-ISO-8859-1 characters must be escaped.</li> | |||||
<li>By setting the <var>url</var> attribute with the URL from which to load the properties. This | <li>By setting the <var>url</var> attribute with the URL from which to load the properties. This | ||||
URL must be directed to a file that has the format as defined by the file used in the | URL must be directed to a file that has the format as defined by the file used in the | ||||
class <code>java.util.Properties</code>.</li> | |||||
class <code class="code">java.util.Properties</code>.</li> | |||||
<li>By setting the <var>resource</var> attribute with the resource name of the property file to | <li>By setting the <var>resource</var> attribute with the resource name of the property file to | ||||
load. A resource is a property file on the current classpath, or on the specified | load. A resource is a property file on the current classpath, or on the specified | ||||
classpath.</li> | classpath.</li> | ||||
@@ -164,16 +164,16 @@ local definition is available (the table priority order being PROCESS, JOB, GROU | |||||
<h4>Any OS except OpenVMS</h4> | <h4>Any OS except OpenVMS</h4> | ||||
<p><em>Since Ant 1.8.2</em>, if Ant detects it is running on a Java 5 or newer, Ant will | <p><em>Since Ant 1.8.2</em>, if Ant detects it is running on a Java 5 or newer, Ant will | ||||
use <code>System.getenv()</code> rather than its own OS dependent native implementation. For some | |||||
OSes this causes minor differences when compared to older versions of Ant. For a full list | |||||
see <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=49366" target="_top">Bugzilla Issue | |||||
49366</a>. In particular:</p> | |||||
use <code class="code">System.getenv()</code> rather than its own OS dependent native | |||||
implementation. For some OSes this causes minor differences when compared to older versions of Ant. | |||||
For a full list see <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=49366" | |||||
target="_top">Bugzilla Issue 49366</a>. In particular:</p> | |||||
<ul> | <ul> | ||||
<li>On Windows, Ant will now return additional "environment variables" that correspond to the | <li>On Windows, Ant will now return additional "environment variables" that correspond to the | ||||
drive specific current working directories when Ant is run from the command line. The keys of | drive specific current working directories when Ant is run from the command line. The keys of | ||||
these variables starts with an equals sign.</li> | these variables starts with an equals sign.</li> | ||||
<li>Some users reported that some Cygwin specific variables (in particular <code>PROMPT</code>) | <li>Some users reported that some Cygwin specific variables (in particular <code>PROMPT</code>) | ||||
was no longer present.</li> | |||||
were no longer present.</li> | |||||
<li>On OS/2, Ant no longer returns the <code>BEGINLIBPATH</code> variable.</li> | <li>On OS/2, Ant no longer returns the <code>BEGINLIBPATH</code> variable.</li> | ||||
</ul> | </ul> | ||||
@@ -241,7 +241,7 @@ personal settings with a file per user.</p> | |||||
<p>As stated, this task will load in a properties file stored in the file system, or as a resource | <p>As stated, this task will load in a properties file stored in the file system, or as a resource | ||||
on a classpath. Here are some interesting facts about this feature</p> | on a classpath. Here are some interesting facts about this feature</p> | ||||
<ol> | <ol> | ||||
<li>If the file is not there, nothing is printed except at <code>-verbose</code> log level. This | |||||
<li>If the file is not there, nothing is printed except at <kbd>-verbose</kbd> log level. This | |||||
lets you have optional configuration files for every project, that team members can customize. | lets you have optional configuration files for every project, that team members can customize. | ||||
<li>The rules for this format | <li>The rules for this format | ||||
match <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-" | match <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-" | ||||
@@ -267,7 +267,7 @@ variables. So it starts a command in a new process which prints the environment | |||||
the output and creates the properties.<br/> There are commands for the following operating systems | the output and creates the properties.<br/> There are commands for the following operating systems | ||||
implemented | implemented | ||||
in <a href="https://git-wip-us.apache.org/repos/asf?p=ant.git;a=blob;f=src/main/org/apache/tools/ant/taskdefs/Execute.java;hb=refs/heads/master" | in <a href="https://git-wip-us.apache.org/repos/asf?p=ant.git;a=blob;f=src/main/org/apache/tools/ant/taskdefs/Execute.java;hb=refs/heads/master" | ||||
target="_top">Execute.java</a> (method <code>getProcEnvCommand()</code>): | |||||
target="_top">Execute.java</a> (method <code class="code">getProcEnvCommand()</code>): | |||||
</p> | </p> | ||||
<table> | <table> | ||||
<tr> | <tr> | ||||
@@ -29,8 +29,9 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>This task is provided for the purpose of allowing the user to <strong>(a)</strong> install a | <p>This task is provided for the purpose of allowing the user to <strong>(a)</strong> install a | ||||
different <code>PropertyHelper</code> at runtime, or <strong>(b)</strong> (hopefully more often) | different <code>PropertyHelper</code> at runtime, or <strong>(b)</strong> (hopefully more often) | ||||
install one or more <code>PropertyHelper</code> Delegates into the <code>PropertyHelper</code> | |||||
active on the current <code>Project</code>. This is somewhat advanced Apache Ant usage and assumes a | |||||
install one or more <code class="code">PropertyHelper</code> Delegates into | |||||
the <code class="code">PropertyHelper</code> active on the | |||||
current <code class="code">Project</code>. This is somewhat advanced Apache Ant usage and assumes a | |||||
working familiarity with the modern Ant APIs. See the description of | working familiarity with the modern Ant APIs. See the description of | ||||
Ant's <a href="../properties.html#propertyHelper">Property Helper</a> for more information.</p> | Ant's <a href="../properties.html#propertyHelper">Property Helper</a> for more information.</p> | ||||
@@ -41,11 +42,12 @@ Ant's <a href="../properties.html#propertyHelper">Property Helper</a> for more i | |||||
instance.</p> | instance.</p> | ||||
<h4>PropertyHelper.Delegate</h4> | <h4>PropertyHelper.Delegate</h4> | ||||
<p>You may specify, either in conjunction with a new <code>PropertyHelper</code> or not, one or more | |||||
configured implementations of the <code>org.apache.tools.ant.PropertyHelper.Delegate</code> | |||||
interface. A deeper understanding of the API is required here, however, as <code>Delegate</code> is | |||||
a marker interface only: the nested arguments must implement a <code>Delegate</code> subinterface in | |||||
order to do anything meaningful.</p> | |||||
<p>You may specify, either in conjunction with a new <code class="code">PropertyHelper</code> or | |||||
not, one or more configured implementations of | |||||
the <code class="code">org.apache.tools.ant.PropertyHelper.Delegate</code> interface. A deeper | |||||
understanding of the API is required here, however, as <code class="code">Delegate</code> is a | |||||
marker interface only: the nested arguments must implement a <code class="code">Delegate</code> | |||||
subinterface in order to do anything meaningful.</p> | |||||
<h4>delegate</h4> | <h4>delegate</h4> | ||||
<p>A generic <code><delegate></code> element which can use project references is also | <p>A generic <code><delegate></code> element which can use project references is also | ||||
@@ -67,8 +69,8 @@ provided:</p> | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<p>Install a completely different <code>PropertyHelper</code> implementation | |||||
(assuming <code>MyPropertyHelper extends PropertyHelper</code>):</p> | |||||
<p>Install a completely different <code class="code">PropertyHelper</code> implementation | |||||
(assuming <code class="code">MyPropertyHelper extends PropertyHelper</code>):</p> | |||||
<pre> | <pre> | ||||
<componentdef classname="org.example.MyPropertyHelper" | <componentdef classname="org.example.MyPropertyHelper" | ||||
@@ -78,10 +80,11 @@ provided:</p> | |||||
</propertyhelper> | </propertyhelper> | ||||
</pre> | </pre> | ||||
<p>Add a new <code>PropertyEvaluator</code> delegate (assuming <code>MyPropertyEvaluator implements | |||||
PropertyHelper.PropertyEvaluator</code>). Note that <code>PropertyHelper</code> uses the configured | |||||
delegates in LIFO order. I.e. the delegate added by this task will be consulted before any | |||||
previously defined delegate and in particular before the built-in ones.</p> | |||||
<p>Add a new <code class="code">PropertyEvaluator</code> delegate | |||||
(assuming <code class="code">MyPropertyEvaluator implements | |||||
PropertyHelper.PropertyEvaluator</code>). Note that <code class="code">PropertyHelper</code> uses | |||||
the configured delegates in LIFO order. I.e. the delegate added by this task will be consulted | |||||
before any previously defined delegate and in particular before the built-in ones.</p> | |||||
<pre> | <pre> | ||||
<componentdef classname="org.example.MyPropertyEvaluator" | <componentdef classname="org.example.MyPropertyEvaluator" | ||||
@@ -91,7 +94,8 @@ previously defined delegate and in particular before the built-in ones.</p> | |||||
</propertyhelper> | </propertyhelper> | ||||
</pre> | </pre> | ||||
<p>Add a new <code>PropertyEvaluator</code> delegate using the <var>refid</var> syntax:</p> | |||||
<p>Add a new <code class="code">PropertyEvaluator</code> delegate using the <var>refid</var> | |||||
syntax:</p> | |||||
<pre> | <pre> | ||||
<typedef classname="org.example.MyPropertyEvaluator" | <typedef classname="org.example.MyPropertyEvaluator" | ||||
@@ -116,7 +116,7 @@ the repository.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>pvcsbin</td> | <td>pvcsbin</td> | ||||
<td>On some systems the PVCS executables <code>pcli</code> and <code>get</code> are not found in | |||||
<td>On some systems the PVCS executables <kbd>pcli</kbd> and <kbd>get</kbd> are not found in | |||||
the <code>PATH</code>. In such cases this attribute should be set to the <code>bin</code> | the <code>PATH</code>. In such cases this attribute should be set to the <code>bin</code> | ||||
directory of the PVCS installation containing the executables mentioned before. If this | directory of the PVCS installation containing the executables mentioned before. If this | ||||
attribute isn't specified the tag expects the executables to be found using | attribute isn't specified the tag expects the executables to be found using | ||||
@@ -190,9 +190,9 @@ multiple projects can be specified.</p> | |||||
<target name="getlatest"> | <target name="getlatest"> | ||||
<pvcs repository="/mnt/pvcs" pvcsproject="/myprj"/> | <pvcs repository="/mnt/pvcs" pvcsproject="/myprj"/> | ||||
</target></pre> | </target></pre> | ||||
<p>Now run: <code>ant getlatest</code></p> | |||||
<p>Now run: <kbd>ant getlatest</kbd></p> | |||||
<p>This will cause the following output to appear:</p> | <p>This will cause the following output to appear:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
getlatest: | getlatest: | ||||
[pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86 | [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86 | ||||
[pvcs] Copyright 1985-2000 MERANT. All rights reserved. | [pvcs] Copyright 1985-2000 MERANT. All rights reserved. | ||||
@@ -219,9 +219,9 @@ projects using nested <code><pvcsproject></code> elements.</p> | |||||
<pvcsproject name="/myprj2"/> | <pvcsproject name="/myprj2"/> | ||||
</pvcs> | </pvcs> | ||||
</target></pre> | </target></pre> | ||||
<p>Now run: <code>ant getlatest2</code></p> | |||||
<p>Now run: <kbd>ant getlatest2</kbd></p> | |||||
<p>This will cause the following output to appear:</p> | <p>This will cause the following output to appear:</p> | ||||
<pre> | |||||
<pre class="output"> | |||||
getlatest2: | getlatest2: | ||||
[pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86 | [pvcs] PVCS Version Manager (VMGUI) v6.6.10 (Build 870) for Windows NT/80x86 | ||||
[pvcs] Copyright 1985-2000 MERANT. All rights reserved. | [pvcs] Copyright 1985-2000 MERANT. All rights reserved. | ||||
@@ -33,8 +33,8 @@ rebuilds based on unchanged files which have been regenerated by this task.</p> | |||||
<p>Similar to <a href="../Types/mapper.html#regexp-mapper">regexp type mappers</a> this task needs a | <p>Similar to <a href="../Types/mapper.html#regexp-mapper">regexp type mappers</a> this task needs a | ||||
supporting regular expression library and an implementation | supporting regular expression library and an implementation | ||||
of <code>org.apache.tools.ant.util.regexp.Regexp</code>. See details in the documentation of | |||||
the <a href="../Types/regexp.html#implementation">Regexp Type</a>.</p> | |||||
of <code class="code">org.apache.tools.ant.util.regexp.Regexp</code>. See details in the | |||||
documentation of the <a href="../Types/regexp.html#implementation">Regexp Type</a>.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -26,8 +26,8 @@ | |||||
<p><em>Since Apache Ant 1.7.1</em></p> | <p><em>Since Apache Ant 1.7.1</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p><code>Retry</code> is a container which executes a single nested task until either: there is no | <p><code>Retry</code> is a container which executes a single nested task until either: there is no | ||||
failure; or: its <var>retrycount</var> has been exceeded. If this happens a BuildException is | |||||
thrown.</p> | |||||
failure; or: its <var>retrycount</var> has been exceeded. If this happens | |||||
a <code>BuildException</code> is thrown.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -26,7 +26,7 @@ | |||||
<h2 id="rmic">Rmic</h2> | <h2 id="rmic">Rmic</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Runs the <code>rmic</code> compiler for a certain class.</p> | |||||
<p>Runs the <kbd>rmic</kbd> compiler for a certain class.</p> | |||||
<p><code>Rmic</code> can be run on a single class (as specified with the classname attribute) or a | <p><code>Rmic</code> can be run on a single class (as specified with the classname attribute) or a | ||||
number of classes at once (all classes below base that are neither <code>_Stub</code> | number of classes at once (all classes below base that are neither <code>_Stub</code> | ||||
nor <code>_Skel</code> classes). If you want to <code>rmic</code> a single class and this class is | nor <code>_Skel</code> classes). If you want to <code>rmic</code> a single class and this class is | ||||
@@ -58,9 +58,9 @@ are the choices:</p> | |||||
<li><q>forking</q>—(<em>since Apache Ant 1.7</em>) the <q>sun</q> compiler forked into a | <li><q>forking</q>—(<em>since Apache Ant 1.7</em>) the <q>sun</q> compiler forked into a | ||||
separate process. <em>Since Ant 1.9.8</em>, this is the default when running on JDK 9+.</li> | separate process. <em>Since Ant 1.9.8</em>, this is the default when running on JDK 9+.</li> | ||||
<li><q>xnew</q>—(<em>since Ant 1.7</em>) the <q>sun</q> compiler forked into a separate | <li><q>xnew</q>—(<em>since Ant 1.7</em>) the <q>sun</q> compiler forked into a separate | ||||
process, with the <code>-Xnew</code> option. This is the most reliable way to | |||||
use <code>-Xnew</code>.<br/>JDK 9 has removed support for <code>-Xnew</code> and <em>since Ant | |||||
1.9.8</em> this option will be rejected when running on JDK 9.</li> | |||||
process, with the <kbd>-Xnew</kbd> option. This is the most reliable way to | |||||
use <kbd>-Xnew</kbd>.<br/>JDK 9 has removed support for <kbd>-Xnew</kbd> and <em>since Ant | |||||
1.9.8</em> this option will be rejected when running on JDK 9+.</li> | |||||
<li><q></q> (empty string). This has the same behaviour as not setting the compiler attribute. | <li><q></q> (empty string). This has the same behaviour as not setting the compiler attribute. | ||||
First the value of <code>build.rmic</code> is used if defined, and if not, the default for the | First the value of <code>build.rmic</code> is used if defined, and if not, the default for the | ||||
platform is chosen. If <code>build.rmic</code> is set to this, you get the default.</li> | platform is chosen. If <code>build.rmic</code> is set to this, you get the default.</li> | ||||
@@ -73,8 +73,8 @@ consult miniRMI's documentation to learn how to use it.</p> | |||||
<h4>CORBA support</h4> | <h4>CORBA support</h4> | ||||
<p>Java 11 <a href="http://openjdk.java.net/jeps/320" target="_top">removes</a> the Java EE and | <p>Java 11 <a href="http://openjdk.java.net/jeps/320" target="_top">removes</a> the Java EE and | ||||
CORBA packages and <code>rmic</code> no longer supports either <code>iiop</code> | |||||
or <code>idl</code>. Starting with Ant 1.10.3, the <code>rmic</code> task will fail when using | |||||
CORBA packages and <kbd>rmic</kbd> no longer supports either <kbd>-iiop</kbd> | |||||
or <kbd>-idl</kbd> options. Starting with Ant 1.10.3, the <kbd>rmic</kbd> task will fail when using | |||||
either while running Java 11+ unless you fork the task and explicitly specify an executable.</p> | either while running Java 11+ unless you fork the task and explicitly specify an executable.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -96,7 +96,7 @@ either while running Java 11+ unless you fork the task and explicitly specify an | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>classname</td> | <td>classname</td> | ||||
<td>the class for which to run <code>rmic</code>.</td> | |||||
<td>the class for which to run <kbd>rmic</kbd>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -106,15 +106,15 @@ either while running Java 11+ unless you fork the task and explicitly specify an | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>sourcebase</td> | <td>sourcebase</td> | ||||
<td>Pass the <code>-keepgenerated</code> flag to <code>rmic</code> and move the generated source | |||||
<td>Pass the <kbd>-keepgenerated</kbd> flag to <kbd>rmic</kbd> and move the generated source | |||||
file to the given <var>sourcebase</var> directory.</td> | file to the given <var>sourcebase</var> directory.</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>stubversion</td> | <td>stubversion</td> | ||||
<td>Specify the JDK version for the generated stub code. Specify <q>1.1</q> to pass | <td>Specify the JDK version for the generated stub code. Specify <q>1.1</q> to pass | ||||
the <code>-v1.1</code> option to <code>rmic</code>, <q>1.2</q> | |||||
for <code>-v12</code>, <q>compat</q> for <code>-vcompat</code>.<br/><em>Since Ant 1.7</em>, if | |||||
the <kbd>-v1.1</kbd> option to <kbd>rmic</kbd>, <q>1.2</q> | |||||
for <kbd>-v1.2</kbd>, <q>compat</q> for <kbd>-vcompat</kbd>.<br/><em>Since Ant 1.7</em>, if | |||||
you do not specify a version, and do not ask for <samp>.iiop</samp> or <samp>.idl</samp> | you do not specify a version, and do not ask for <samp>.iiop</samp> or <samp>.idl</samp> | ||||
files, <q>compat</q> is selected.</td> | files, <q>compat</q> is selected.</td> | ||||
<td>No; default is <q>compat</q></td> | <td>No; default is <q>compat</q></td> | ||||
@@ -157,7 +157,7 @@ either while running Java 11+ unless you fork the task and explicitly specify an | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>verify</td> | <td>verify</td> | ||||
<td>check that classes implement <code>Remote</code> before handing them to <code>rmic</code></td> | |||||
<td>check that classes implement <code>Remote</code> before handing them to <kbd>rmic</kbd></td> | |||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -184,7 +184,7 @@ either while running Java 11+ unless you fork the task and explicitly specify an | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>debug</td> | <td>debug</td> | ||||
<td>generate debug info (passes <code>-g</code> to <code>rmic</code>)</td> | |||||
<td>generate debug info (passes <kbd>-g</kbd> to <kbd>rmic</kbd>)</td> | |||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -211,9 +211,9 @@ either while running Java 11+ unless you fork the task and explicitly specify an | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>executable</td> | <td>executable</td> | ||||
<td>Complete path to the <code>rmic</code> executable to use in case of the <q>forking</q> | |||||
<td>Complete path to the <kbd>rmic</kbd> executable to use in case of the <q>forking</q> | |||||
or <q>xnew</q> compiler. <em>Since Ant 1.8.0</em>.</td> | or <q>xnew</q> compiler. <em>Since Ant 1.8.0</em>.</td> | ||||
<td>No; defaults to the <code>rmic</code> compiler of JDK that is currently running Ant</td> | |||||
<td>No; defaults to the <kbd>rmic</kbd> compiler of JDK that is currently running Ant</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>listfiles</td> | <td>listfiles</td> | ||||
@@ -298,10 +298,10 @@ can be used as an alternative to the <var>compiler</var> attribute.</p> | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<pre><rmic classname="com.xyz.FooBar" base="${build}/classes"/></pre> | <pre><rmic classname="com.xyz.FooBar" base="${build}/classes"/></pre> | ||||
<p>runs the <code>rmic</code> compiler for the class <code>com.xyz.FooBar</code>. The compiled files | |||||
<p>runs the <kbd>rmic</kbd> compiler for the class <code>com.xyz.FooBar</code>. The compiled files | |||||
will be stored in the directory <samp>${build}/classes</samp>.</p> | will be stored in the directory <samp>${build}/classes</samp>.</p> | ||||
<pre><rmic base="${build}/classes" includes="**/Remote*.class"/></pre> | <pre><rmic base="${build}/classes" includes="**/Remote*.class"/></pre> | ||||
<p>runs the <code>rmic</code> compiler for all classes with <samp>.class</samp> files | |||||
<p>runs the <kbd>rmic</kbd> compiler for all classes with <samp>.class</samp> files | |||||
below <samp>${build}/classes</samp> whose classname starts with <code>Remote</code>. The compiled | below <samp>${build}/classes</samp> whose classname starts with <code>Remote</code>. The compiled | ||||
files will be stored in the directory <samp>${build}/classes</samp>.</p> | files will be stored in the directory <samp>${build}/classes</samp>.</p> | ||||
@@ -56,31 +56,31 @@ with <code>rpm</code> support.</p> | |||||
<tr> | <tr> | ||||
<td>cleanBuildDir</td> | <td>cleanBuildDir</td> | ||||
<td>This will remove the generated files in the <samp>BUILD</samp> directory. See the | <td>This will remove the generated files in the <samp>BUILD</samp> directory. See the | ||||
the <code>--clean</code> option of rpmbuild.</td> | |||||
the <kbd>--clean</kbd> option of <kbd>rpmbuild</kbd>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>removeSpec</td> | <td>removeSpec</td> | ||||
<td>This will remove the spec file from <samp>SPECS</samp>. See the the <code>--rmspec</code> | |||||
option of <code>rpmbuild</code>.</td> | |||||
<td>This will remove the spec file from <samp>SPECS</samp>. See the the <kbd>--rmspec</kbd> | |||||
option of <kbd>rpmbuild</kbd>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>removeSource</td> | <td>removeSource</td> | ||||
<td>Flag to remove the sources after the build. See the <code>--rmsource</code> option | |||||
of <code>rpmbuild</code>.</td> | |||||
<td>Flag to remove the sources after the build. See the <kbd>--rmsource</kbd> option | |||||
of <kbd>rpmbuild</kbd>.</td> | |||||
<td>No; default is <q>false</q></td> | <td>No; default is <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>rpmBuildCommand</td> | <td>rpmBuildCommand</td> | ||||
<td>The executable to use for building the RPM. Set this if default executables are not on | <td>The executable to use for building the RPM. Set this if default executables are not on | ||||
<code>PATH</code> or a different executable is needed. <em>Since Apache Ant 1.6</em>.</td> | <code>PATH</code> or a different executable is needed. <em>Since Apache Ant 1.6</em>.</td> | ||||
<td>No; defaults to <code>rpmbuild</code> if it can be found or <code>rpm</code> otherwise</td> | |||||
<td>No; defaults to <kbd>rpmbuild</kbd> if it can be found or <kbd>rpm</kbd> otherwise</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>command</td> | <td>command</td> | ||||
<td>The command to pass to the <code>rpmbuild</code> program.</td> | <td>The command to pass to the <code>rpmbuild</code> program.</td> | ||||
<td>No; default is <code>-bb</code></td> | |||||
<td>No; default is <kbd>-bb</kbd></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>quiet</td> | <td>quiet</td> | ||||
@@ -169,7 +169,7 @@ their URL equivalents.</p> | |||||
perform entity resolution.</p> | perform entity resolution.</p> | ||||
<h4>attribute</h4> | <h4>attribute</h4> | ||||
<p>The <code><attribute></code> element is used to set parser features.<br/>Features usable | <p>The <code><attribute></code> element is used to set parser features.<br/>Features usable | ||||
with the xerces parser are defined here: <a href="https://xml.apache.org/xerces-j/features.html" | |||||
with the Xerces parser are defined here: <a href="https://xml.apache.org/xerces-j/features.html" | |||||
target="_top">Setting features</a><br/>SAX features are defined | target="_top">Setting features</a><br/>SAX features are defined | ||||
here: <a href="http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description" | here: <a href="http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description" | ||||
target="_top"><code>http://xml.org/sax/features/</code></a></p> | target="_top"><code>http://xml.org/sax/features/</code></a></p> | ||||
@@ -260,9 +260,9 @@ can be a serious security hole. Consider using variable substitution and includ | |||||
the command line. For example:</p> | the command line. For example:</p> | ||||
<pre><scp todir="${username}:${password}@host:/dir" ...></pre> | <pre><scp todir="${username}:${password}@host:/dir" ...></pre> | ||||
<p>Invoking Ant with the following command line:</p> | <p>Invoking Ant with the following command line:</p> | ||||
<pre>ant -Dusername=me -Dpassword=mypassword target1 target2</pre> | |||||
<p>Is slightly better, but the username/password is exposed to all users on an Unix system (via | |||||
the <code>ps</code> command). The best approach is to use the <code><input></code> task and/or | |||||
<pre class="input">ant -Dusername=me -Dpassword=mypassword target1 target2</pre> | |||||
<p>is slightly better, but the username/password is exposed to all users on an Unix system (via | |||||
the <kbd>ps</kbd> command). The best approach is to use the <code><input></code> task and/or | |||||
retrieve the password from a (secured) <samp>.properties</samp> file.</p> | retrieve the password from a (secured) <samp>.properties</samp> file.</p> | ||||
<p><strong>Unix Note</strong>: File permissions are not retained when files are downloaded; they end | <p><strong>Unix Note</strong>: File permissions are not retained when files are downloaded; they end | ||||
@@ -39,10 +39,10 @@ indicated by <q>javax</q>.</p> | |||||
<p>All items (tasks, targets, etc) of the running project are accessible from the script, using | <p>All items (tasks, targets, etc) of the running project are accessible from the script, using | ||||
either their <var>name</var> or <var>id</var> attributes (as long as their names are considered | either their <var>name</var> or <var>id</var> attributes (as long as their names are considered | ||||
valid Java identifiers, that is). This is controlled by the <var>setbeans</var> attribute of the | valid Java identifiers, that is). This is controlled by the <var>setbeans</var> attribute of the | ||||
task. The name <code>project</code> is a pre-defined reference to the Project, which can be used | |||||
instead of the project name. The name <code>self</code> is a pre-defined reference to the | |||||
actual <code><script></code>-Task instance.<br/>From these objects you have access to the Ant | |||||
Java API, see the <a href="../api/index.html">JavaDoc</a> (especially | |||||
task. The name <code class="code">project</code> is a pre-defined reference to the Project, which | |||||
can be used instead of the project name. The name <code class="code">self</code> is a pre-defined | |||||
reference to the actual <code><script></code>-Task instance.<br/>From these objects you have | |||||
access to the Ant Java API, see the <a href="../api/index.html">JavaDoc</a> (especially | |||||
for <a href="../api/org/apache/tools/ant/Project.html">Project</a> | for <a href="../api/org/apache/tools/ant/Project.html">Project</a> | ||||
and <a href="../api/org/apache/tools/ant/taskdefs/optional/Script.html">Script</a>) for more | and <a href="../api/org/apache/tools/ant/taskdefs/optional/Script.html">Script</a>) for more | ||||
information.</p> | information.</p> | ||||
@@ -124,7 +124,7 @@ In particular all targets should have different location values.</p> | |||||
<h4>classpath</h4> | <h4>classpath</h4> | ||||
<p><em>Since Ant 1.7</em></p> | <p><em>Since Ant 1.7</em></p> | ||||
<p><code>Script</code>'s <var>classpath</var> attribute is a <a href="../using.html#path">path-like | <p><code>Script</code>'s <var>classpath</var> attribute is a <a href="../using.html#path">path-like | ||||
structure</a> and can also be set via a nestedq <code><classpath></code> element. | |||||
structure</a> and can also be set via a nested <code><classpath></code> element. | |||||
</p> | </p> | ||||
<p>If a classpath is set, it will be used as the current thread context classloader, and as the | <p>If a classpath is set, it will be used as the current thread context classloader, and as the | ||||
classloader given to the BSF manager. This means that it can be used to specify the classpath | classloader given to the BSF manager. This means that it can be used to specify the classpath | ||||
@@ -266,21 +266,22 @@ of all files a <code><fileset/></code> caught.</p> | |||||
<p>We want to use the Java API. Because we don't want always typing the package signature we do an | <p>We want to use the Java API. Because we don't want always typing the package signature we do an | ||||
import. Rhino knows two different methods for import statements: one for packages and one for a | import. Rhino knows two different methods for import statements: one for packages and one for a | ||||
single class. By default only the <code>java</code> packages are available, | single class. By default only the <code>java</code> packages are available, | ||||
so <code>java.lang.System</code> can be directly imported | |||||
so <code class="code">java.lang.System</code> can be directly imported | |||||
with <code>importClass/importPackage</code>. For other packages you have to prefix the full | with <code>importClass/importPackage</code>. For other packages you have to prefix the full | ||||
classified name with <strong>Packages</strong>. For example Ant's <code>FileUtils</code> class can | classified name with <strong>Packages</strong>. For example Ant's <code>FileUtils</code> class can | ||||
be imported | be imported | ||||
with <code>importClass(<strong>Packages</strong>.org.apache.tools.ant.util.FileUtils)</code><br/> | |||||
with <code class="code">importClass(<strong>Packages</strong>.org.apache.tools.ant.util.FileUtils)</code><br/> | |||||
The <code><script></code> task populates the Project instance under the | The <code><script></code> task populates the Project instance under the | ||||
name <code>project</code>, so we can use that reference. Another way is to use its given name or | name <code>project</code>, so we can use that reference. Another way is to use its given name or | ||||
getting its reference from the task itself.<br/> The Project provides methods for accessing and | getting its reference from the task itself.<br/> The Project provides methods for accessing and | ||||
setting properties, creating DataTypes and Tasks and much more.<br/> After creating a FileSet | setting properties, creating DataTypes and Tasks and much more.<br/> After creating a FileSet | ||||
object we initialize that by calling its set-methods. Then we can use that object like a normal Ant | object we initialize that by calling its set-methods. Then we can use that object like a normal Ant | ||||
task (<code><copy></code> for example).<br/> For getting the size of a file we instantiate | task (<code><copy></code> for example).<br/> For getting the size of a file we instantiate | ||||
a <code>java.io.File</code>. So we are using normal Java API here.<br/> Finally we use | |||||
a <code class="code">java.io.File</code>. So we are using normal Java API here.<br/> Finally we use | |||||
the <code><echo></code> task for producing the output. The task is not executed by | the <code><echo></code> task for producing the output. The task is not executed by | ||||
its <code>execute()</code> method, because the <code>perform()</code> method (implemented in Task | |||||
itself) does the appropriate logging before and after invoking <code>execute()</code>.</p> | |||||
its <code class="code">execute()</code> method, because the <code class="code">perform()</code> | |||||
method (implemented in Task itself) does the appropriate logging before and after | |||||
invoking <code class="code">execute()</code>.</p> | |||||
<p>Here is an example of using beanshell to create an Ant task. This task will add filesets and | <p>Here is an example of using beanshell to create an Ant task. This task will add filesets and | ||||
paths to a referenced path. If the path does not exist, it will be created.</p> | paths to a referenced path. If the path does not exist, it will be created.</p> | ||||
<pre> | <pre> | ||||
@@ -313,7 +314,7 @@ paths to a referenced path. If the path does not exist, it will be created.</p> | |||||
project.addTaskDefinition("addtopath", AddToPath.class); | project.addTaskDefinition("addtopath", AddToPath.class); | ||||
</script></pre> | </script></pre> | ||||
<p>An example of using this task to create a path from a list of directories (using | <p>An example of using this task to create a path from a list of directories (using | ||||
ant-contrib's <a href="http://ant-contrib.sourceforge.net/tasks/tasks/for.html" | |||||
Ant-Contrib's <a href="http://ant-contrib.sourceforge.net/tasks/tasks/for.html" | |||||
target="_top"><for></a> task) follows:</p> | target="_top"><for></a> task) follows:</p> | ||||
<pre> | <pre> | ||||
<path id="main.path"> | <path id="main.path"> | ||||
@@ -43,28 +43,29 @@ information.</p> | |||||
<p>The attributes and nested elements supported by the task may be defined | <p>The attributes and nested elements supported by the task may be defined | ||||
using <code><attribute></code> and <code><element></code> nested elements. These are | using <code><attribute></code> and <code><element></code> nested elements. These are | ||||
available to the script that implements the task as two collection style script | available to the script that implements the task as two collection style script | ||||
variables <code>attributes</code> and <code>elements</code>. The elements in | |||||
the <code>attributes</code> collection may be accessed by the attribute | |||||
name. The <code>elements</code> collection is accessed by the nested element name. This will return | |||||
a list of all instances of the nested element. The instances in this list may be accessed by an | |||||
integer index.</p> | |||||
variables <code class="code">attributes</code> and <code class="code">elements</code>. The elements | |||||
in the <code class="code">attributes</code> collection may be accessed by the attribute | |||||
name. The <code class="code">elements</code> collection is accessed by the nested element name. This | |||||
will return a list of all instances of the nested element. The instances in this list may be | |||||
accessed by an integer index.</p> | |||||
<p><strong>Note</strong>: Ant will turn all attribute and element names into all lowercase names, so | <p><strong>Note</strong>: Ant will turn all attribute and element names into all lowercase names, so | ||||
even if you use <var>name</var>=<q>SomeAttribute</q>, you'll have to use <q>someattribute</q> to | even if you use <var>name</var>=<q>SomeAttribute</q>, you'll have to use <q>someattribute</q> to | ||||
retrieve the attribute's value from the <code>attributes</code> collection.</p> | |||||
retrieve the attribute's value from the <code class="code">attributes</code> collection.</p> | |||||
<p>The name <code>self</code> (<em>since Ant 1.6.3</em>) is a pre-defined reference to | |||||
<p>The name <code class="code">self</code> (<em>since Ant 1.6.3</em>) is a pre-defined reference to | |||||
the <code>scriptdef</code> task instance. It can be used for logging, or for integration with the | the <code>scriptdef</code> task instance. It can be used for logging, or for integration with the | ||||
rest of Ant. the <code>self.text attribute</code> contains any nested text passed to the script</p> | |||||
rest of Ant. The <code class="code">self.text</code> attribute contains any nested text passed to | |||||
the script</p> | |||||
<p>If an attribute or element is not passed in, then <code>attributes.get()</code> | |||||
or <code>elements.get()</code> will return null. It is up to the script to perform any checks and | |||||
validation. <code>self.fail(String message)</code>can be used to raise | |||||
<p>If an attribute or element is not passed in, then <code class="code">attributes.get()</code> | |||||
or <code class="code">elements.get()</code> will return null. It is up to the script to perform any | |||||
checks and validation. <code class="code">self.fail(String message)</code>can be used to raise | |||||
a <code>BuildException</code>.</p> | a <code>BuildException</code>.</p> | ||||
<p>The name <code>project</code> is a pre-defined reference to the Ant Project. For more information | |||||
on writing scripts, please refer to the <a href="script.html"><code><script></code></a> | |||||
task.</p> | |||||
<p>The name <code class="code">project</code> is a pre-defined reference to the Ant Project. For | |||||
more information on writing scripts, please refer to | |||||
the <a href="script.html"><code><script></code></a> task.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -236,8 +237,8 @@ through them</p> | |||||
error. For example in the above script, removing the closing curly bracket would result in this | error. For example in the above script, removing the closing curly bracket would result in this | ||||
error</p> | error</p> | ||||
<pre>build.xml:15: SyntaxError: missing } in compound | |||||
statement (scriptdef <code><scripttest2></code>; line 10)</pre> | |||||
<pre class="output">build.xml:15: SyntaxError: missing } in compound | |||||
statement (scriptdef <scripttest2>; line 10)</pre> | |||||
<p>Script errors are only detected when a <code>script</code> task is actually executed.</p> | <p>Script errors are only detected when a <code>script</code> task is actually executed.</p> | ||||
<p>The next example does uses nested text in Jython. It also declares the script in a new xml | <p>The next example does uses nested text in Jython. It also declares the script in a new xml | ||||
@@ -29,7 +29,7 @@ | |||||
<p>Signing a jar allows users to authenticate the publisher.</p> | <p>Signing a jar allows users to authenticate the publisher.</p> | ||||
<p>Signs JAR files with | <p>Signs JAR files with | ||||
the <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jarsigner.html" | the <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jarsigner.html" | ||||
target="_top"><code>jarsigner</code> command line tool</a>. It will take a named file in | |||||
target="_top"><kbd>jarsigner</kbd></a> command line tool. It will take a named file in | |||||
the <var>jar</var> attribute, and an optional <var>destDir</var> or <var>signedJar</var> | the <var>jar</var> attribute, and an optional <var>destDir</var> or <var>signedJar</var> | ||||
attribute. Nested paths are also supported; here only an (optional) <var>destDir</var> is | attribute. Nested paths are also supported; here only an (optional) <var>destDir</var> is | ||||
allowed. If a destination directory or explicit JAR file name is not provided, JARs are signed in | allowed. If a destination directory or explicit JAR file name is not provided, JARs are signed in | ||||
@@ -119,7 +119,7 @@ place.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>maxmemory</td> | <td>maxmemory</td> | ||||
<td>Specifies the maximum memory the <code>jarsigner</code> JVM will use. Specified in the style | |||||
<td>Specifies the maximum memory the <kbd>jarsigner</kbd> JVM will use. Specified in the style | |||||
of standard Java memory specs (e.g. <q>128m</q> = 128 MBytes)</td> | of standard Java memory specs (e.g. <q>128m</q> = 128 MBytes)</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -150,9 +150,9 @@ place.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>executable</td> | <td>executable</td> | ||||
<td>Specify a particular <code>jarsigner</code> executable to use in place of the default binary | |||||
<td>Specify a particular <kbd>jarsigner</kbd> executable to use in place of the default binary | |||||
(found in the same JDK as Apache Ant is running in).<br/>Must support the same command line | (found in the same JDK as Apache Ant is running in).<br/>Must support the same command line | ||||
options as the Sun JDK <code>jarsigner</code> command. <em>since Ant 1.8.0</em>.</td> | |||||
options as the Sun JDK <kbd>jarsigner</kbd> command. <em>since Ant 1.8.0</em>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -250,7 +250,7 @@ the files will only be signed if they are not already signed.</p> | |||||
</signjar></pre> | </signjar></pre> | ||||
<p>Sign all the JAR files in <samp>dist/**/*.jar</samp> using the digest algorithm SHA1 and the | <p>Sign all the JAR files in <samp>dist/**/*.jar</samp> using the digest algorithm SHA1 and the | ||||
signature algorithm MD5withRSA. This is especially useful when you want to use the JDK | signature algorithm MD5withRSA. This is especially useful when you want to use the JDK | ||||
7 <code>jarsigner</code> (which uses SHA256 and SHA256withRSA as default) to create signed jars that | |||||
7 <kbd>jarsigner</kbd> (which uses SHA256 and SHA256withRSA as default) to create signed jars that | |||||
will be deployed on platforms not supporting SHA256 and SHA256withRSA.</p> | will be deployed on platforms not supporting SHA256 and SHA256withRSA.</p> | ||||
<h3>About timestamp signing</h3> | <h3>About timestamp signing</h3> | ||||
@@ -45,10 +45,10 @@ target="_top">SourceGear's</a> <a href="https://sourcegear.com/sos/" target="_to | |||||
product. SourceOffSite is an add-on to Microsoft's VSS, that allows remote development teams and | product. SourceOffSite is an add-on to Microsoft's VSS, that allows remote development teams and | ||||
tele-commuters that need fast and secure read/write access to a centralized SourceSafe database via | tele-commuters that need fast and secure read/write access to a centralized SourceSafe database via | ||||
any TCP/IP connection. SOS provides Linux, Solaris & Windows | any TCP/IP connection. SOS provides Linux, Solaris & Windows | ||||
clients. The <code>org.apache.tools.ant.taskdefs.optional.sos</code> package consists of a simple | |||||
framework to support SOS functionality as well as some Apache Ant tasks encapsulating frequently | |||||
used SOS commands. Although it is possible to use these commands on the desktop, they were | |||||
primarily intended to be used by automated build systems. These tasks have been tested with | |||||
clients. The <code class="code">org.apache.tools.ant.taskdefs.optional.sos</code> package consists | |||||
of a simple framework to support SOS functionality as well as some Apache Ant tasks encapsulating | |||||
frequently used SOS commands. Although it is possible to use these commands on the desktop, they | |||||
were primarily intended to be used by automated build systems. These tasks have been tested with | |||||
SourceOffSite version 3.5.1 connecting to VisualSourceSafe 6.0. The tasks have been tested with | SourceOffSite version 3.5.1 connecting to VisualSourceSafe 6.0. The tasks have been tested with | ||||
Linux, Solaris & Windows 2000.</p> | Linux, Solaris & Windows 2000.</p> | ||||
@@ -95,7 +95,7 @@ Linux, Solaris & Windows 2000.</p> | |||||
<tbody> | <tbody> | ||||
<tr> | <tr> | ||||
<td>soscmd</td> | <td>soscmd</td> | ||||
<td>Directory which contains <code>soscmd(.exe)</code></td> | |||||
<td>Directory which contains <kbd>soscmd(.exe)</kbd></td> | |||||
<td>No; by default, the executable must be in the path</td> | <td>No; by default, the executable must be in the path</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -207,7 +207,7 @@ working directory.</p> | |||||
<tbody> | <tbody> | ||||
<tr> | <tr> | ||||
<td>soscmd</td> | <td>soscmd</td> | ||||
<td>Directory which contains <code>soscmd(.exe)</code></td> | |||||
<td>Directory which contains <kbd>soscmd(.exe)</kbd></td> | |||||
<td>No; by default, the executable must be in the path</td> | <td>No; by default, the executable must be in the path</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -283,7 +283,7 @@ the <samp>$/SourceRoot/project1</samp> project with <q>test label</q>.</p> | |||||
<tbody> | <tbody> | ||||
<tr> | <tr> | ||||
<td>soscmd</td> | <td>soscmd</td> | ||||
<td>Directory which contains <code>soscmd(.exe)</code></td> | |||||
<td>Directory which contains <kbd>soscmd(.exe)</kbd></td> | |||||
<td>No; by default, the executable must be in the path</td> | <td>No; by default, the executable must be in the path</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -391,7 +391,7 @@ be displayed on screen.</p> | |||||
<tbody> | <tbody> | ||||
<tr> | <tr> | ||||
<td>soscmd</td> | <td>soscmd</td> | ||||
<td>Directory which contains <code>soscmd(.exe)</code></td> | |||||
<td>Directory which contains <kbd>soscmd(.exe)</kbd></td> | |||||
<td>No; by default, the executable must be in the path</td> | <td>No; by default, the executable must be in the path</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -36,7 +36,7 @@ specify.</p> | |||||
finishes. Therefore you have to place this task as top level or inside a target which is always | finishes. Therefore you have to place this task as top level or inside a target which is always | ||||
executed.</p> | executed.</p> | ||||
<p>Unless you are running on Java 1.3 or later, you need the Java Media Framework on the classpath | <p>Unless you are running on Java 1.3 or later, you need the Java Media Framework on the classpath | ||||
(<code>javax.sound</code>).</p> | |||||
(<code class="code">javax.sound</code>).</p> | |||||
<h3>Parameters specified as nested elements</h3> | <h3>Parameters specified as nested elements</h3> | ||||
<h4>success</h4> | <h4>success</h4> | ||||
@@ -45,7 +45,7 @@ and transaction and fail task.</p> | |||||
proxy settings to route their JDBC operations to the database. <em>Since Apache Ant 1.7</em>, Ant | proxy settings to route their JDBC operations to the database. <em>Since Apache Ant 1.7</em>, Ant | ||||
running on Java 5 or later defaults to <a href="../proxy.html">using the proxy settings of the | running on Java 5 or later defaults to <a href="../proxy.html">using the proxy settings of the | ||||
operating system</a>. Accordingly, the OS proxy settings need to be valid, or Ant's proxy support | operating system</a>. Accordingly, the OS proxy settings need to be valid, or Ant's proxy support | ||||
disabled with <code>-noproxy</code> option.</p> | |||||
disabled with <kbd>-noproxy</kbd> option.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -173,7 +173,7 @@ JSCh earlier than 0.1.28.</p> | |||||
<tr> | <tr> | ||||
<td>verbose</td> | <td>verbose</td> | ||||
<td>Determines whether <code>sshexec</code> outputs verbosely to the user.<br/> Similar output | <td>Determines whether <code>sshexec</code> outputs verbosely to the user.<br/> Similar output | ||||
is generated as the <code>ssh</code> commandline tool with the <code>-v</code> | |||||
is generated as the <kbd>ssh</kbd> command line tool with the <kbd>-v</kbd> | |||||
option. <em>since Ant 1.8.0</em></td> | option. <em>since Ant 1.8.0</em></td> | ||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
@@ -196,7 +196,7 @@ JSCh earlier than 0.1.28.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>usepty</td> | <td>usepty</td> | ||||
<td>Whether to allocate a pseudo-tty (like <code>ssh -t</code>). <em>since Ant 1.8.3</em></td> | |||||
<td>Whether to allocate a pseudo-tty (like <kbd>ssh -t</kbd>). <em>since Ant 1.8.3</em></td> | |||||
<td>No; defaults to <q>false</q></td> | <td>No; defaults to <q>false</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -261,9 +261,9 @@ command line. For example:</p> | |||||
password="${password}" | password="${password}" | ||||
command="touch somefile"/></pre> | command="touch somefile"/></pre> | ||||
<p>Invoking Ant with the following command line:</p> | <p>Invoking Ant with the following command line:</p> | ||||
<pre>ant -Dusername=me -Dpassword=mypassword target1 target2</pre> | |||||
<pre class="input">ant -Dusername=me -Dpassword=mypassword target1 target2</pre> | |||||
<p>is slightly better, but the username/password is exposed to all users on an Unix system (via | <p>is slightly better, but the username/password is exposed to all users on an Unix system (via | ||||
the <code>ps</code> command). The best approach is to use the <code><input></code> task and/or | |||||
the <kbd>ps</kbd> command). The best approach is to use the <code><input></code> task and/or | |||||
retrieve the password from a (secured) <samp>.properties</samp> file.</p> | retrieve the password from a (secured) <samp>.properties</samp> file.</p> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -242,9 +242,9 @@ and include the password on the command line. For example:</p> | |||||
</sshsession></pre> | </sshsession></pre> | ||||
<p>Invoking Ant with the following command line:</p> | <p>Invoking Ant with the following command line:</p> | ||||
<pre>ant -Dusername=me -Dpassword=mypassword target1 target2</pre> | |||||
<pre class="input">ant -Dusername=me -Dpassword=mypassword target1 target2</pre> | |||||
<p>is slightly better, but the username/password is exposed to all users on an Unix system (via | <p>is slightly better, but the username/password is exposed to all users on an Unix system (via | ||||
the <code>ps</code> command). The best approach is to use the <code><input></code> task and/or | |||||
the <kbd>ps</kbd> command). The best approach is to use the <code><input></code> task and/or | |||||
retrieve the password from a (secured) <samp>.properties</samp> file.</p> | retrieve the password from a (secured) <samp>.properties</samp> file.</p> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -45,7 +45,7 @@ whether you want to use default exclusions or not. See the section | |||||
on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the | on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the | ||||
inclusion/exclusion of files works, and how to write patterns.</p> | inclusion/exclusion of files works, and how to write patterns.</p> | ||||
<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports all | <p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports all | ||||
attributes of <code><fileset></code> (<code>dir</code> becomes <code>basedir</code>) as well | |||||
attributes of <code><fileset></code> (<var>dir</var> becomes <var>basedir</var>) as well | |||||
as the nested <code><include></code>, <code><exclude></code> | as the nested <code><include></code>, <code><exclude></code> | ||||
and <code><patternset></code> elements.</p> | and <code><patternset></code> elements.</p> | ||||
@@ -55,7 +55,7 @@ stylesheets to all files contain in them as well. Since the default <var>includ | |||||
is <code>**</code> this means it will apply the stylesheet to all files. If you specify | is <code>**</code> this means it will apply the stylesheet to all files. If you specify | ||||
an <var>excludes</var> pattern, it may still work on the files matched by those patterns because the | an <var>excludes</var> pattern, it may still work on the files matched by those patterns because the | ||||
parent directory has been matched. If this behavior is not what you want, set | parent directory has been matched. If this behavior is not what you want, set | ||||
the <var>scanincludedirectories</var> attribute to false.</p> | |||||
the <var>scanincludedirectories</var> attribute to <q>false</q>.</p> | |||||
<p><em>Since Ant 1.7</em>, this task supports | <p><em>Since Ant 1.7</em>, this task supports | ||||
nested <a href="../Types/resources.html#collection">resource collections</a> in addition to (or | nested <a href="../Types/resources.html#collection">resource collections</a> in addition to (or | ||||
@@ -405,7 +405,7 @@ documentation of your processor. For example, in Xalan 2.x:</p> | |||||
<tr> | <tr> | ||||
<td>classloaderforpath</td> | <td>classloaderforpath</td> | ||||
<td class="left">Value of the attribute is a classloader that uses the classpath specified by a | <td class="left">Value of the attribute is a classloader that uses the classpath specified by a | ||||
path that is the project reference with the given id. <em>since Ant 1.9.8</em></td> | |||||
path that is the project reference with the given <var>id</var>. <em>since Ant 1.9.8</em></td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
</blockquote> | </blockquote> | ||||
@@ -168,7 +168,7 @@ whose dependencies are the targets so specified, in the order specified.</p> | |||||
</subant> | </subant> | ||||
</target> | </target> | ||||
</project></pre> | </project></pre> | ||||
<p>this snippet build file will run <code>ant</code> in each subdirectory of the project directory, | |||||
<p>this snippet build file will run <kbd>ant</kbd> in each subdirectory of the project directory, | |||||
where a file called <samp>build.xml</samp> can be found. The property <code>build.dir</code> will | where a file called <samp>build.xml</samp> can be found. The property <code>build.dir</code> will | ||||
have the value <q>subant1.build</q> in the Ant projects called by <code>subant</code>.</p> | have the value <q>subant1.build</q> in the Ant projects called by <code>subant</code>.</p> | ||||
<pre> | <pre> | ||||
@@ -179,7 +179,7 @@ have the value <q>subant1.build</q> in the Ant projects called by <code>subant</ | |||||
</propertyset> | </propertyset> | ||||
<fileset dir="." includes="*/build.xml"/> | <fileset dir="." includes="*/build.xml"/> | ||||
</subant></pre> | </subant></pre> | ||||
<p>this snippet build file will run <code>ant</code> in each subdirectory of the project directory, | |||||
<p>this snippet build file will run <kbd>ant</kbd> in each subdirectory of the project directory, | |||||
where a file called <samp>build.xml</samp> can be found. All properties whose name starts | where a file called <samp>build.xml</samp> can be found. All properties whose name starts | ||||
with <q>foo</q> are passed, their names are changed to start with <q>bar</q> instead</p> | with <q>foo</q> are passed, their names are changed to start with <q>bar</q> instead</p> | ||||
<pre> | <pre> | ||||
@@ -111,14 +111,14 @@ named <samp>dir.links</samp></p> | |||||
<p><strong>Java 1.2 and earlier</strong>: Due to limitations on executing system level commands in | <p><strong>Java 1.2 and earlier</strong>: Due to limitations on executing system level commands in | ||||
Java versions earlier than 1.3 this task may have difficulty operating with a relative path | Java versions earlier than 1.3 this task may have difficulty operating with a relative path | ||||
in <code>ANT_HOME</code>. The typical symptom is an IOException where Apache Ant can't | |||||
in <code>ANT_HOME</code>. The typical symptom is an <code>IOException</code> where Apache Ant can't | |||||
find <samp>/some/working/directory${ANT_HOME}/bin/antRun</samp> or something similar. The workaround | find <samp>/some/working/directory${ANT_HOME}/bin/antRun</samp> or something similar. The workaround | ||||
is to change your <code>ANT_HOME</code> environment variable to an absolute path, which will remove | is to change your <code>ANT_HOME</code> environment variable to an absolute path, which will remove | ||||
the <samp>/some/working/directory</samp> portion of the above path and allow Ant to find the correct | the <samp>/some/working/directory</samp> portion of the above path and allow Ant to find the correct | ||||
command line execution script.</p> | command line execution script.</p> | ||||
<p><strong>Note</strong>: <em>Since Ant 1.10.2</em>, this task relies on the symbolic link support | <p><strong>Note</strong>: <em>Since Ant 1.10.2</em>, this task relies on the symbolic link support | ||||
introduced in Java 7 through the <code>java.nio.file.Files</code> APIs</p> | |||||
introduced in Java 7 through the <code class="code">java.nio.file.Files</code> APIs</p> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -40,27 +40,28 @@ access mode, username and groupname to be applied to the tar entries. This is us | |||||
when preparing archives for Unix systems where some files need to have execute permission. By | when preparing archives for Unix systems where some files need to have execute permission. By | ||||
default this task will use Unix permissions of 644 for files and 755 for directories.</p> | default this task will use Unix permissions of 644 for files and 755 for directories.</p> | ||||
<p>Early versions of <code>tar</code> utility did not support paths longer than 100 characters. Over | |||||
<p>Early versions of <kbd>tar</kbd> utility did not support paths longer than 100 characters. Over | |||||
time several incompatible extensions have been developed until a new POSIX standard was created that | time several incompatible extensions have been developed until a new POSIX standard was created that | ||||
added so called PAX extension headers (as the <code>pax</code> utility first introduced them) that | |||||
among another things addressed file names longer than 100 characters. All modern implementations of | |||||
tar support PAX extension headers.</p> | |||||
<p>Ant's tar support predates the standard with PAX extension headers, it supports different | |||||
dialects that can be enabled using the <var>longfile</var> attribute. If the <var>longfile</var> | |||||
attribute is set to <q>fail</q>, any long paths will cause the tar task to fail. If | |||||
the <var>longfile</var> attribute is set to <q>truncate</q>, any long paths will be truncated to the | |||||
100 character maximum length prior to adding to the archive. If the value of the <var>longfile</var> | |||||
attribute is set to <q>omit</q> then files containing long paths will be omitted from the archive. | |||||
Either option ensures that the archive can be untarred by any compliant version of tar.</p> | |||||
added so called PAX extension headers (as the <kbd>pax</kbd> utility first introduced them) that | |||||
among another things addressed file names longer than 100 characters. All modern implementations | |||||
of <kbd>tar</kbd> support PAX extension headers.</p> | |||||
<p>Ant's <kbd>tar</kbd> support predates the standard with PAX extension headers, it supports | |||||
different dialects that can be enabled using the <var>longfile</var> attribute. If | |||||
the <var>longfile</var> attribute is set to <q>fail</q>, any long paths will cause | |||||
the <code>tar</code> task to fail. If the <var>longfile</var> attribute is set to <q>truncate</q>, | |||||
any long paths will be truncated to the 100 character maximum length prior to adding to the | |||||
archive. If the value of the <var>longfile</var> attribute is set to <q>omit</q> then files | |||||
containing long paths will be omitted from the archive. Either option ensures that the archive can | |||||
be untarred by any compliant version of <kbd>tar</kbd>.</p> | |||||
<p>If the loss of path or file information is not acceptable, and it rarely is, <var>longfile</var> | <p>If the loss of path or file information is not acceptable, and it rarely is, <var>longfile</var> | ||||
may be set to the value <q>gnu</q> or <q>posix</q>. With <q>posix</q> Ant will add PAX extension | may be set to the value <q>gnu</q> or <q>posix</q>. With <q>posix</q> Ant will add PAX extension | ||||
headers, with <q>gnu</q> it adds GNU tar specific extensions that newer versions of GNU tar | |||||
call <q>oldgnu</q>. GNU tar still creates these extensions by default but supports PAX extension | |||||
headers as well. Either choice will produce a tar file which can have arbitrary length paths. Note | |||||
however, that the resulting archive will only be able to be untarred with tar tools that support the | |||||
chosen format.</p> | |||||
headers, with <q>gnu</q> it adds GNU <kbd>tar</kbd> specific extensions that newer versions of | |||||
GNU <kbd>tar</kbd> call <q>oldgnu</q>. GNU <kbd>tar</kbd> still creates these extensions by default | |||||
but supports PAX extension headers as well. Either choice will produce a tar file which can have | |||||
arbitrary length paths. Note however, that the resulting archive will only be able to be untarred | |||||
with <kbd>tar</kbd> tools that support the chosen format.</p> | |||||
<p>The default for the <var>longfile</var> attribute is <q>warn</q> which behaves just like | <p>The default for the <var>longfile</var> attribute is <q>warn</q> which behaves just like | ||||
the <q>gnu</q> option except that it produces a warning for each filepath encountered that does not | the <q>gnu</q> option except that it produces a warning for each filepath encountered that does not | ||||
@@ -26,8 +26,8 @@ | |||||
<h2 id="telnet">Telnet</h2> | <h2 id="telnet">Telnet</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<q>Task to automate a remote telnet session. The task uses nested <code><read></code> to | |||||
indicate strings to wait for, and <code><write></code> tags to specify text to send.</q> | |||||
<p>Task to automate a remote telnet session. The task uses nested <code><read></code> to | |||||
indicate strings to wait for, and <code><write></code> tags to specify text to send.</p> | |||||
<p>If you do specify a userid and password, the system will assume a common Unix prompt to wait | <p>If you do specify a userid and password, the system will assume a common Unix prompt to wait | ||||
on. This behavior can be easily overridden.</p> | on. This behavior can be easily overridden.</p> | ||||
@@ -115,7 +115,7 @@ of <q>ogin:</q> for the userid, and a prompt of <q>assword:</q> for the password | |||||
</telnet></pre> | </telnet></pre> | ||||
<p>A timeout can be specified at the <code><telnet></code> level or at | <p>A timeout can be specified at the <code><telnet></code> level or at | ||||
the <code><read></code> level. This will connect, issue a <code>sleep</code> command that is | |||||
the <code><read></code> level. This will connect, issue a <kbd>sleep</kbd> command that is | |||||
suppressed from displaying and wait 10 seconds before quitting.</p> | suppressed from displaying and wait 10 seconds before quitting.</p> | ||||
<pre> | <pre> | ||||
@@ -26,8 +26,8 @@ | |||||
<h2>Tempfile Task</h2> | <h2>Tempfile Task</h2> | ||||
<h3 id="description">Description</h3> | <h3 id="description">Description</h3> | ||||
<p>This task sets a property to the name of a temporary file. | <p>This task sets a property to the name of a temporary file. | ||||
Unlike <code>java.io.File.createTempFile</code>, this task does not actually create the temporary | |||||
file, but it does guarantee that the file did not exist when the task was executed.</p> | |||||
Unlike <code class="code">java.io.File.createTempFile</code>, this task does not actually create the | |||||
temporary file, but it does guarantee that the file did not exist when the task was executed.</p> | |||||
<h3 id="attributes">Parameters</h3> | <h3 id="attributes">Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -33,10 +33,10 @@ on <a href="../Types/resources.html">resources</a> and resource collections (whi | |||||
directories). Prior to Apache Ant 1.7 only FileSet or <a href="../Types/filelist.html">Filelist</a> | directories). Prior to Apache Ant 1.7 only FileSet or <a href="../Types/filelist.html">Filelist</a> | ||||
(<em>since Ant 1.6</em>) were supported.</p> | (<em>since Ant 1.6</em>) were supported.</p> | ||||
<p>Ant uses the API of <code>java.io.File</code> to set the last modification time which has some | |||||
limitations. For example, the timestamp granularity depends on the operating system and sometimes | |||||
the operating system may allow a granularity smaller than milliseconds. If you need more control | |||||
you have to fall back to the <code><exec></code> task and native commands.</p> | |||||
<p>Ant uses the API of <code class="code">java.io.File</code> to set the last modification time | |||||
which has some limitations. For example, the timestamp granularity depends on the operating system | |||||
and sometimes the operating system may allow a granularity smaller than milliseconds. If you need | |||||
more control you have to fall back to the <code><exec></code> task and native commands.</p> | |||||
<p><em>Since Ant 1.8.2</em>, a warning message is logged upon failure to change the file | <p><em>Since Ant 1.8.2</em>, a warning message is logged upon failure to change the file | ||||
modification time. This will happen if you try to change the modification time of a file you do not | modification time. This will happen if you try to change the modification time of a file you do not | ||||
@@ -90,8 +90,9 @@ own on many Unix systems, for example.</p> | |||||
<p>You can use any number of nested resource collection elements to define the resources for this | <p>You can use any number of nested resource collection elements to define the resources for this | ||||
task and refer to resources defined elsewhere. <strong>Note</strong>: resources passed to this task | task and refer to resources defined elsewhere. <strong>Note</strong>: resources passed to this task | ||||
must implement the <code>org.apache.tools.ant.types.resources.Touchable</code> interface, this is | |||||
true for all filesystem-based resources like those returned by path, fileset ot filelist.</p> | |||||
must implement the <code class="code">org.apache.tools.ant.types.resources.Touchable</code> | |||||
interface, this is true for all filesystem-based resources like those returned by path, fileset ot | |||||
filelist.</p> | |||||
<p>For backwards compatibility directories matched by nested filesets will be "touched" as well, use | <p>For backwards compatibility directories matched by nested filesets will be "touched" as well, use | ||||
a <var>type</var> selector to suppress this. This only applies to filesets nested into the task | a <var>type</var> selector to suppress this. This only applies to filesets nested into the task | ||||
@@ -103,7 +104,7 @@ Files specified via nested <code>fileset</code>s, <code>filelist</code>s, or the | |||||
attribute are mapped using the specified mapper. For each file mapped, the resulting files are | attribute are mapped using the specified mapper. For each file mapped, the resulting files are | ||||
touched. If no time has been specified and the original file exists its timestamp will be used. If | touched. If no time has been specified and the original file exists its timestamp will be used. If | ||||
no time has been specified and the original file does not exist the current time is used. <em>Since | no time has been specified and the original file does not exist the current time is used. <em>Since | ||||
Ant 1.8</em>, the task settings (<var>millis</var>, and <var>datetime</var>) have priority over the | |||||
Ant 1.8</em>, the task settings (<var>millis</var> and <var>datetime</var>) have priority over the | |||||
timestamp of the original file.</p> | timestamp of the original file.</p> | ||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
@@ -54,7 +54,7 @@ bundle files can be specified.</p> | |||||
If <var>forceoverwrite</var> is <q>false</q>, the destination file is overwritten only if either the | If <var>forceoverwrite</var> is <q>false</q>, the destination file is overwritten only if either the | ||||
source file or any of the files that make up the bundle have been modified after the destination | source file or any of the files that make up the bundle have been modified after the destination | ||||
file was last modified.</p> | file was last modified.</p> | ||||
<p><em>Since Apache Ant 1.6</em>:<br/>Line endings of source files are preserved in the translated | |||||
<p><em>Since Apache Ant 1.6</em> line endings of source files are preserved in the translated | |||||
files.</p> | files.</p> | ||||
<p><a href="../Types/fileset.html">FileSet</a>s are used to select files to translate.</p> | <p><a href="../Types/fileset.html">FileSet</a>s are used to select files to translate.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -28,8 +28,8 @@ | |||||
<p><em>Since Apache Ant 1.7.1</em></p> | <p><em>Since Apache Ant 1.7.1</em></p> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Set the length of one or more files, as the intermittently available <code>truncate</code> Unix | |||||
utility/function. In addition to working with a single file, this Task can also work | |||||
<p>Set the length of one or more files, as the <code>truncate</code> Unix function or GNU | |||||
utility. In addition to working with a single file, this Task can also work | |||||
on <a href="../Types/resources.html">resources</a> and resource collections.</p> | on <a href="../Types/resources.html">resources</a> and resource collections.</p> | ||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
@@ -28,8 +28,8 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Adds a task or a data type definition to the current project such that this new type or task can | <p>Adds a task or a data type definition to the current project such that this new type or task can | ||||
be used in the current project.</p> | be used in the current project.</p> | ||||
<p>A Task is any class that extends <code>org.apache.tools.ant.Task</code> or can be adapted as a | |||||
Task using an adapter class.</p> | |||||
<p>A Task is any class that extends <code class="code">org.apache.tools.ant.Task</code> or can be adapted | |||||
as a Task using an adapter class.</p> | |||||
<p>Data types are things like <a href="../using.html#path">paths</a> | <p>Data types are things like <a href="../using.html#path">paths</a> | ||||
or <a href="../Types/fileset.html">filesets</a> that can be defined at the project level and | or <a href="../Types/fileset.html">filesets</a> that can be defined at the project level and | ||||
referenced via their <var>id</var> attribute. Custom data types usually need custom tasks to put | referenced via their <var>id</var> attribute. Custom data types usually need custom tasks to put | ||||
@@ -159,9 +159,10 @@ structure</a> and can also be set via a nested <code>classpath</code> element.</ | |||||
type.</p> | type.</p> | ||||
<p>Assuming a class <code>org.acme.ant.RunnableAdapter</code> that extends Task and | <p>Assuming a class <code>org.acme.ant.RunnableAdapter</code> that extends Task and | ||||
implements <code>org.apache.tools.ant.TypeAdapter</code>, and in the execute method | |||||
invokes <code>run()</code> on the proxied object, one may use a Runnable class as an Ant task. The | |||||
following fragment defines a task called <code>runclock</code>.</p> | |||||
implements <code class="code">org.apache.tools.ant.TypeAdapter</code>, and in | |||||
the <code class="code">execute()</code> method invokes <code class="code">run()</code> on the | |||||
proxied object, one may use a <code>Runnable</code> class as an Ant task. The following fragment | |||||
defines a task called <code>runclock</code>.</p> | |||||
<pre> | <pre> | ||||
<typedef name="runclock" | <typedef name="runclock" | ||||
classname="com.acme.ant.RunClock" | classname="com.acme.ant.RunClock" | ||||
@@ -191,7 +192,7 @@ important:</p> | |||||
classpath="path/to/ant-contrib.jar"/></pre> | classpath="path/to/ant-contrib.jar"/></pre> | ||||
<p>Here the namespace declaration <code>xmlns:antcontrib="antlib:net.sf.antcontrib"</code> allows | <p>Here the namespace declaration <code>xmlns:antcontrib="antlib:net.sf.antcontrib"</code> allows | ||||
tasks and types of the AntContrib Antlib to be used with the <samp>antcontrib</samp> prefix | |||||
tasks and types of the Ant-Contrib Antlib to be used with the <samp>antcontrib</samp> prefix | |||||
like <code><antcontrib:if></code>. The normal rules of XML namespaces apply and you can | like <code><antcontrib:if></code>. The normal rules of XML namespaces apply and you can | ||||
declare the prefix at any element to make it usable for the element it is declared on as well as all | declare the prefix at any element to make it usable for the element it is declared on as well as all | ||||
its child elements.</p> | its child elements.</p> | ||||
@@ -26,8 +26,10 @@ | |||||
<h2 id="verifyjar">VerifyJar</h2> | <h2 id="verifyjar">VerifyJar</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Verifies JAR files with the <code>jarsigner</code> command line tool. It will take a named file | |||||
in the <var>jar</var> attribute. Nested paths are also supported.</p> | |||||
<p>Verifies JAR files with | |||||
the <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jarsigner.html" | |||||
target="_top"><kbd>jarsigner</kbd></a> command line tool. It will take a named file in | |||||
the <var>jar</var> attribute. Nested paths are also supported.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -83,15 +85,15 @@ in the <var>jar</var> attribute. Nested paths are also supported.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>maxmemory</td> | <td>maxmemory</td> | ||||
<td>Specifies the maximum memory the <code>jarsigner</code> JVM will use. Specified in the style | |||||
<td>Specifies the maximum memory the <kbd>jarsigner</kbd> JVM will use. Specified in the style | |||||
of standard Java memory specs (e.g. <q>128m</q> = 128 MBytes)</td> | of standard Java memory specs (e.g. <q>128m</q> = 128 MBytes)</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>executable</td> | <td>executable</td> | ||||
<td>Specify a particular <code>jarsigner</code> executable to use in place of the default binary | |||||
<td>Specify a particular <kbd>jarsigner</kbd> executable to use in place of the default binary | |||||
(found in the same JDK as Apache Ant is running in).<br/> Must support the same command line | (found in the same JDK as Apache Ant is running in).<br/> Must support the same command line | ||||
options as the Sun JDK <code>jarsigner</code> command. <em>since Ant 1.8.0</em>.</td> | |||||
options as the Sun JDK <kbd>jarsigner</kbd> command. <em>since Ant 1.8.0</em>.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -46,13 +46,13 @@ | |||||
<p>These tasks provide an interface to | <p>These tasks provide an interface to | ||||
the <a href="https://msdn.microsoft.com/en-us/library/3h0544kx(v=vs.80).aspx" | the <a href="https://msdn.microsoft.com/en-us/library/3h0544kx(v=vs.80).aspx" | ||||
target="_top">Microsoft Visual SourceSafe</a> SCM. | target="_top">Microsoft Visual SourceSafe</a> SCM. | ||||
The <code>org.apache.tools.ant.taskdefs.optional.vss</code> package consists of a simple framework | |||||
to support VSS functionality as well as some Apache Ant tasks encapsulating frequently used VSS | |||||
commands. Although it is possible to use these commands on the desktop, they were primarily | |||||
intended to be used by automated build systems.</p> | |||||
<p>If you get a <code>CreateProcess error=2</code> when running these, it means | |||||
that <code>ss.exe</code> was not found. Check to see if you can run it from the command | |||||
line—you may need to alter your path, or set the <var>ssdir</var> property.</p> | |||||
The <code class="code">org.apache.tools.ant.taskdefs.optional.vss</code> package consists of a | |||||
simple framework to support VSS functionality as well as some Apache Ant tasks encapsulating | |||||
frequently used VSS commands. Although it is possible to use these commands on the desktop, they | |||||
were primarily intended to be used by automated build systems.</p> | |||||
<p>If you get a <code class="output">CreateProcess error=2</code> when running these, it means | |||||
that <kbd>ss.exe</kbd> was not found. Check to see if you can run it from the command line—you | |||||
may need to alter your path, or set the <var>ssdir</var> property.</p> | |||||
<h2 id="tasks">The Tasks</h2> | <h2 id="tasks">The Tasks</h2> | ||||
<table> | <table> | ||||
@@ -127,7 +127,7 @@ order version, date, label.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -168,7 +168,7 @@ order version, date, label.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>autoresponse</td> | <td>autoresponse</td> | ||||
<td>What to respond with (sets the <code>-I</code> option). By default, <code>-I-</code> is | |||||
<td>What to respond with (sets the <kbd>-I</kbd> option). By default, <kbd>-I-</kbd> is | |||||
used; values of <q>Y</q> or <q>N</q> will be appended to this.</td> | used; values of <q>Y</q> or <q>N</q> will be appended to this.</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -180,7 +180,7 @@ order version, date, label.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q></td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q></td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -233,7 +233,7 @@ writable.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -259,13 +259,13 @@ writable.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>autoresponse</td> | <td>autoresponse</td> | ||||
<td>What to respond with (sets the <code>-I</code> option). By default, <code>-I-</code> is | |||||
<td>What to respond with (sets the <kbd>-I</kbd> option). By default, <kbd>-I-</kbd> is | |||||
used; values of <q>Y</q> or <q>N</q> will be appended to this.</td> | used; values of <q>Y</q> or <q>N</q> will be appended to this.</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q>.</td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q>.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -314,7 +314,7 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -376,7 +376,7 @@ Task to perform HISTORY commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q></td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q></td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -451,7 +451,7 @@ specified according to your locale).</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -481,7 +481,7 @@ specified according to your locale).</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q>.</td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q>.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -531,7 +531,7 @@ order <var>version</var>, <var>date</var>, <var>label</var>.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -570,7 +570,7 @@ order <var>version</var>, <var>date</var>, <var>label</var>.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q>.</td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q>.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -623,7 +623,7 @@ Task to perform ADD commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -653,7 +653,7 @@ Task to perform ADD commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q>.</td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q>.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -694,7 +694,7 @@ Task to perform ADD commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -704,7 +704,7 @@ Task to perform ADD commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>failonerror</td> | <td>failonerror</td> | ||||
<td>Stop the build process if <code>ss.exe</code> exits with a return code <q>100</q>.</td> | |||||
<td>Stop the build process if <kbd>ss.exe</kbd> exits with a return code <q>100</q>.</td> | |||||
<td>No; defaults to <q>true</q></td> | <td>No; defaults to <q>true</q></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -740,7 +740,7 @@ Task to perform ADD commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>ssdir</td> | <td>ssdir</td> | ||||
<td>directory where <code>ss.exe</code> resides.</td> | |||||
<td>directory where <kbd>ss.exe</kbd> resides.</td> | |||||
<td>No; by default expected to be in <code>PATH</code></td> | <td>No; by default expected to be in <code>PATH</code></td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -755,7 +755,7 @@ Task to perform ADD commands to Microsoft Visual SourceSafe. | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>autoresponse</td> | <td>autoresponse</td> | ||||
<td>What to respond with (sets the <code>-I</code> option). By default, <code>-I-</code> is | |||||
<td>What to respond with (sets the <kbd>-I</kbd> option). By default, <kbd>-I-</kbd> is | |||||
used; values of <q>Y</q> or <q>N</q> will be appended to this.</td> | used; values of <q>Y</q> or <q>N</q> will be appended to this.</td> | ||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
@@ -118,10 +118,10 @@ perform entity resolution.</p> | |||||
<h4>attribute</h4> | <h4>attribute</h4> | ||||
<p>The <code><attribute></code> element is used to set parser features.</p> | <p>The <code><attribute></code> element is used to set parser features.</p> | ||||
<p>Features usable with the Xerces parser are defined | <p>Features usable with the Xerces parser are defined | ||||
here: <a href="https://xml.apache.org/xerces-j/features.html" target="_top">Setting features</a></p> | |||||
here: <a href="https://xml.apache.org/xerces-j/features.html" target="_top">Setting Features</a></p> | |||||
<p>SAX features are defined | <p>SAX features are defined | ||||
here: <a href="http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description" | here: <a href="http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description" | ||||
target="_top"><code>http://xml.org/sax/features/</code></a></p> | |||||
target="_top">SAX2 Standard Feature Flags</a></p> | |||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
<th>Attribute</th> | <th>Attribute</th> | ||||
@@ -212,7 +212,7 @@ task is better for validating W3C XML Schemas, as it extends this task with the | |||||
automatically enabled, and makes it easy to add a list of schema files/URLs to act as sources.</p> | automatically enabled, and makes it easy to add a list of schema files/URLs to act as sources.</p> | ||||
<pre> | <pre> | ||||
<!-- Converts path to URL format --> | |||||
<!-- Convert path to URL format --> | |||||
<pathconvert dirsep="/" property="xsd.file"> | <pathconvert dirsep="/" property="xsd.file"> | ||||
<path> | <path> | ||||
<pathelement location="xml/doc.xsd"/> | <pathelement location="xml/doc.xsd"/> | ||||
@@ -82,8 +82,8 @@ see <a href="#encoding">below</a></p> | |||||
(see description of the <var>filemode</var> and <var>dirmode</var> attributes | (see description of the <var>filemode</var> and <var>dirmode</var> attributes | ||||
for <a href="../Types/zipfileset.html"><zipfileset></a>). Unfortunately there is no portable | for <a href="../Types/zipfileset.html"><zipfileset></a>). Unfortunately there is no portable | ||||
way to store these permissions. Ant uses the algorithm used by <a href="http://www.info-zip.org" | way to store these permissions. Ant uses the algorithm used by <a href="http://www.info-zip.org" | ||||
target="_top">Info-Zip's</a> implementation of the <code>zip</code> and <code>unzip</code> | |||||
commands—these are the default versions of <code>zip</code> and <code>unzip</code> for many | |||||
target="_top">Info-Zip's</a> implementation of the <kbd>zip</kbd> and <kbd>unzip</kbd> | |||||
commands—these are the default versions of <kbd>zip</kbd> and <kbd>unzip</kbd> for many | |||||
Unix(-like) systems.</p> | Unix(-like) systems.</p> | ||||
<p><strong>Please note that the zip format allows multiple files of the same fully-qualified name to | <p><strong>Please note that the zip format allows multiple files of the same fully-qualified name to | ||||
@@ -264,8 +264,8 @@ extract an Ant generated ZIP archive.</p> | |||||
sufficient for many international character sets.</p> | sufficient for many international character sets.</p> | ||||
<p>Over time different archivers have chosen different ways to work around the | <p>Over time different archivers have chosen different ways to work around the | ||||
limitation—the <code>java.util.zip</code> packages simply uses UTF-8 as its encoding for | |||||
example.</p> | |||||
limitation—the <code class="code">java.util.zip</code> packages simply uses UTF-8 as its | |||||
encoding for example.</p> | |||||
<p>Ant has been offering the <q>encoding</q> attribute of the <code>zip</code> | <p>Ant has been offering the <q>encoding</q> attribute of the <code>zip</code> | ||||
and <code>unzip</code> task as a way to explicitly specify the encoding to use (or expect) <em>since | and <code>unzip</code> task as a way to explicitly specify the encoding to use (or expect) <em>since | ||||
@@ -307,13 +307,13 @@ ZIP archives. Below are some test results which may be superseded with later ve | |||||
tool.</p> | tool.</p> | ||||
<ul> | <ul> | ||||
<li>The <code>java.util.zip</code> package used by the <code>jar</code> executable or to read jars | |||||
from your <code>CLASSPATH</code> reads and writes UTF-8 names, it doesn't set or recognize any | |||||
flags or unicode extra fields.</li> | |||||
<li>Since Java 7, <code>java.util.zip</code> writes UTF-8 by default and uses the language | |||||
encoding flag. It is possible to specify a different encoding when reading/writing ZIPs via new | |||||
constructors. The package now recognizes the language encoding flag when reading and ignores | |||||
the Unicode extra fields.</li> | |||||
<li>The <code class="code">java.util.zip</code> package used by the <kbd>jar</kbd> executable or | |||||
to read jars from your <code>CLASSPATH</code> reads and writes UTF-8 names, it doesn't set or | |||||
recognize any flags or unicode extra fields.</li> | |||||
<li>Since Java 7, <code class="code">java.util.zip</code> writes UTF-8 by default and uses the | |||||
language encoding flag. It is possible to specify a different encoding when reading/writing | |||||
ZIPs via new constructors. The package now recognizes the language encoding flag when reading | |||||
and ignores the Unicode extra fields.</li> | |||||
<li>7Zip writes CodePage 437 by default but uses UTF-8 and the language encoding flag when writing | <li>7Zip writes CodePage 437 by default but uses UTF-8 and the language encoding flag when writing | ||||
entries that cannot be encoded as CodePage 437 (similar to the <code>zip</code> task | entries that cannot be encoded as CodePage 437 (similar to the <code>zip</code> task | ||||
with <var>fallbacktoUTF8</var> set to <q>true</q>). It recognizes the language encoding flag | with <var>fallbacktoUTF8</var> set to <q>true</q>). It recognizes the language encoding flag | ||||
@@ -332,16 +332,16 @@ tool.</p> | |||||
<p>So, what to do?</p> | <p>So, what to do?</p> | ||||
<p>If you are creating jars, then <code>java.util.zip</code> is your main consumer. We recommend | |||||
you set the encoding to UTF-8 and keep the language encoding flag enabled. The flag won't help or | |||||
hurt <code>java.util.zip</code> prior to Java 7 but archivers that support it will show the correct | |||||
file names.</p> | |||||
<p>If you are creating jars, then <code class="code">java.util.zip</code> is your main consumer. We | |||||
recommend you set the encoding to UTF-8 and keep the language encoding flag enabled. The flag won't | |||||
help or hurt <code class="code">java.util.zip</code> prior to Java 7 but archivers that support it | |||||
will show the correct file names.</p> | |||||
<p>For maximum interoparability it is probably best to set the encoding to UTF-8, enable the | <p>For maximum interoparability it is probably best to set the encoding to UTF-8, enable the | ||||
language encoding flag and create Unicode extra fields when writing ZIPs. Such archives should be | language encoding flag and create Unicode extra fields when writing ZIPs. Such archives should be | ||||
extracted correctly by <code>java.util.zip</code>, 7Zip, WinZIP, PKWARE tools and most likely | |||||
InfoZIP tools. They will be unusable with Windows' "compressed folders" feature and bigger than | |||||
archives without the Unicode extra fields, though.</p> | |||||
extracted correctly by <code class="code">java.util.zip</code>, 7Zip, WinZIP, PKWARE tools and most | |||||
likely InfoZIP tools. They will be unusable with Windows' "compressed folders" feature and bigger | |||||
than archives without the Unicode extra fields, though.</p> | |||||
<p>If Windows' "compressed folders" is your primary consumer, then your best option is to explicitly | <p>If Windows' "compressed folders" is your primary consumer, then your best option is to explicitly | ||||
set the encoding to the target platform. You may want to enable creation of Unicode extra fields so | set the encoding to the target platform. You may want to enable creation of Unicode extra fields so | ||||
@@ -376,9 +376,9 @@ the <code>zip</code> family of tasks. It supports three values: | |||||
limits of traditional zip files but don't want to waste too much space (the Zip64 extensions take up | limits of traditional zip files but don't want to waste too much space (the Zip64 extensions take up | ||||
extra space). Unfortunately some ZIP implementations don't understand Zip64 extra fields or fail to | extra space). Unfortunately some ZIP implementations don't understand Zip64 extra fields or fail to | ||||
parse archives with extra fields in local file headers that are not present in the central | parse archives with extra fields in local file headers that are not present in the central | ||||
directory, one such implementation is the <code>java.util.zip</code> package of Java 5, that's why | |||||
the <code>jar</code> tasks default to <q>never</q>. Archives created with <q>as-needed</q> can be | |||||
read without problems with Java 6 and later.</p> | |||||
directory, one such implementation is the <code class="code">java.util.zip</code> package of Java 5, | |||||
that's why the <code>jar</code> tasks default to <q>never</q>. Archives created | |||||
with <q>as-needed</q> can be read without problems with Java 6 and later.</p> | |||||
<h3>Parameters specified as nested elements</h3> | <h3>Parameters specified as nested elements</h3> | ||||
@@ -27,10 +27,10 @@ | |||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p> | <p> | ||||
An antlib file is an xml file with a root element of <code>antlib</code>. Antlib's | |||||
elements are Apache Ant definition | |||||
tasks—like <a href="../Tasks/taskdef.html">Taskdef</a> or any Ant task that | |||||
extends <code>org.apache.tools.ant.taskdefs.AntlibDefinition</code>. | |||||
An antlib file is an xml file with a root element of <code>antlib</code>. Antlib's elements | |||||
are Apache Ant definition tasks—like <a href="../Tasks/taskdef.html">Taskdef</a> or any | |||||
Ant task that | |||||
extends <code class="code">org.apache.tools.ant.taskdefs.AntlibDefinition</code>. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
The current set of declarations bundled with Ant that do this are: | The current set of declarations bundled with Ant that do this are: | ||||
@@ -77,11 +77,11 @@ may be used | |||||
<h4>RootFileSet</h4> | <h4>RootFileSet</h4> | ||||
<p> | <p> | ||||
A root fileset is used to add a set of root classes from a fileset. In this case the entries in | |||||
the fileset are expected to be Java class files. The name of the Java class is determined by the | |||||
A root fileset is used to add a set of root classes from a fileset. In this case the entries in the | |||||
fileset are expected to be Java class files. The name of the Java class is determined by the | |||||
relative location of the classfile in the fileset. So, the | relative location of the classfile in the fileset. So, the | ||||
file <code>org/apache/tools/ant/Project.class</code> corresponds to the Java | file <code>org/apache/tools/ant/Project.class</code> corresponds to the Java | ||||
class <code>org.apache.tools.ant.Project</code>.</p> | |||||
class <code class="code">org.apache.tools.ant.Project</code>.</p> | |||||
<h4>Examples</h4> | <h4>Examples</h4> | ||||
<pre> | <pre> | ||||
@@ -90,8 +90,8 @@ class <code>org.apache.tools.ant.Project</code>.</p> | |||||
</classfileset></pre> | </classfileset></pre> | ||||
<p> | <p> | ||||
This example creates a fileset containing all the class files upon which | This example creates a fileset containing all the class files upon which | ||||
the <code>org.apache.tools.ant.Project</code> class depends. This fileset could then be used to | |||||
create a jar. | |||||
the <code class="code">org.apache.tools.ant.Project</code> class depends. This fileset could then be | |||||
used to create a jar. | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
@@ -104,8 +104,9 @@ create a jar. | |||||
<rootfileset dir="${classes.dir}" includes="org/apache/tools/ant/Project*.class"/> | <rootfileset dir="${classes.dir}" includes="org/apache/tools/ant/Project*.class"/> | ||||
</classfileset></pre> | </classfileset></pre> | ||||
<p> | <p> | ||||
This example constructs the classfileset using all the class with names starting with Project in | |||||
the <samp>org.apache.tools.ant</samp> package. | |||||
This example constructs the classfileset using all the class with names starting | |||||
with <code class="code">Project</code> in the <code class="code">org.apache.tools.ant</code> | |||||
package. | |||||
</p> | </p> | ||||
</body> | </body> | ||||
@@ -24,18 +24,16 @@ | |||||
<h2>Custom Components</h2> | <h2>Custom Components</h2> | ||||
<h3>Overview</h3> | <h3>Overview</h3> | ||||
<p> | <p> | ||||
Custom components are conditions, selectors, filters and other objects | |||||
that are defined outside Apache Ant core. | |||||
Custom components are conditions, selectors, filters and other objects that are defined | |||||
outside Apache Ant core. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
In Ant 1.6 custom conditions, selectors and filters has been | |||||
overhauled. | |||||
In Ant 1.6 custom conditions, selectors and filters has been overhauled. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
It is now possible to define custom conditions, selectors and filters | |||||
that behave like Ant Core components. This is achieved by allowing | |||||
datatypes defined in build scripts to be used as custom components if | |||||
the class of the datatype is compatible, or has been adapted by an | |||||
It is now possible to define custom conditions, selectors and filters that behave like Ant | |||||
Core components. This is achieved by allowing datatypes defined in build scripts to be used | |||||
as custom components if the class of the datatype is compatible, or has been adapted by an | |||||
adapter class. | adapter class. | ||||
</p> | </p> | ||||
<p> | <p> | ||||
@@ -43,15 +41,13 @@ | |||||
</p> | </p> | ||||
<h3>Definition and Use</h3> | <h3>Definition and Use</h3> | ||||
<p> | <p> | ||||
A custom component is a normal Java class that implements a particular | |||||
interface or extends a particular class, or has been adapted to the | |||||
interface or class. | |||||
A custom component is a normal Java class that implements a particular interface or extends a | |||||
particular class, or has been adapted to the interface or class. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
It is exactly like writing | |||||
a <a href="../develop.html#writingowntask">custom task</a>. One | |||||
defines attributes and nested elements by writing <em>setter</em> | |||||
methods and <em>add</em> methods. | |||||
It is exactly like writing a <a href="../develop.html#writingowntask">custom task</a>. One | |||||
defines attributes and nested elements by writing <em>setter</em> methods and <em>add</em> | |||||
methods. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
After the class has been written, it is added to the ant system by | After the class has been written, it is added to the ant system by | ||||
@@ -60,9 +56,9 @@ | |||||
<h3 id="customconditions">Custom Conditions</h3> | <h3 id="customconditions">Custom Conditions</h3> | ||||
<p> | <p> | ||||
Custom conditions are datatypes that | Custom conditions are datatypes that | ||||
implement <code>org.apache.tools.ant.taskdefs.condition.Condition</code>. | |||||
For example a custom condition that returns true if a string is all | |||||
upper case could be written as: | |||||
implement <code class="code">org.apache.tools.ant.taskdefs.condition.Condition</code>. For | |||||
example a custom condition that returns true if a string is all upper case could be written | |||||
as: | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
package com.mydomain; | package com.mydomain; | ||||
@@ -104,13 +100,12 @@ public class AllUpperCaseCondition implements Condition { | |||||
<h3 id="customselectors">Custom Selectors</h3> | <h3 id="customselectors">Custom Selectors</h3> | ||||
<p> | <p> | ||||
Custom selectors are datatypes that | Custom selectors are datatypes that | ||||
implement <code>org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
implement <code class="code">org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
There is only one method required, <code>public boolean | |||||
isSelected(File basedir, String filename, File file)</code>. It | |||||
returns true or false depending on whether the given file should be | |||||
selected or not. | |||||
There is only one method required, <code class="code">public boolean isSelected(File basedir, | |||||
String filename, File file)</code>. It returns true or false depending on whether the given | |||||
file should be selected or not. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
An example of a custom selection that selects filenames ending | An example of a custom selection that selects filenames ending | ||||
@@ -134,8 +129,7 @@ public class JavaSelector implements FileSelector { | |||||
classname="com.mydomain.JavaSelector" | classname="com.mydomain.JavaSelector" | ||||
classpath="${mydomain.classes}"/></pre> | classpath="${mydomain.classes}"/></pre> | ||||
<p> | <p> | ||||
This selector can now be used wherever a Core Ant selector is used, | |||||
for example: | |||||
This selector can now be used wherever a Core Ant selector is used, for example: | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
<copy todir="to"> | <copy todir="to"> | ||||
@@ -144,34 +138,30 @@ public class JavaSelector implements FileSelector { | |||||
</fileset> | </fileset> | ||||
</copy></pre> | </copy></pre> | ||||
<p> | <p> | ||||
One may | |||||
use <code>org.apache.tools.ant.types.selectors.BaseSelector</code>, a | |||||
convenience class that provides reasonable default behaviour. It has | |||||
some predefined behaviours you can take advantage of. Any time you | |||||
encounter a problem when setting attributes or adding tags, you can | |||||
call <code>setError(String errmsg)</code> and the class will know that | |||||
there is a problem. Then, at the top of your <code>isSelected()</code> | |||||
method call <code>validate()</code> and a BuildException will be | |||||
thrown with the contents of your error | |||||
message. The <code>validate()</code> method also gives you a last | |||||
chance to check your settings for consistency because it | |||||
calls <code>verifySettings()</code>. Override this method and | |||||
call <code>setError()</code> within it if you detect any problems in | |||||
how your selector is set up. | |||||
One may use <code class="code">org.apache.tools.ant.types.selectors.BaseSelector</code>, a | |||||
convenience class that provides reasonable default behaviour. It has some predefined | |||||
behaviours you can take advantage of. Any time you encounter a problem when setting attributes | |||||
or adding tags, you can call <code class="code">setError(String errmsg)</code> and the class | |||||
will know that there is a problem. Then, at the top of | |||||
your <code class="code">isSelected()</code> method call <code class="code">validate()</code> | |||||
and a <code>BuildException</code> will be thrown with the contents of your error | |||||
message. The <code class="code">validate()</code> method also gives you a last chance to check | |||||
your settings for consistency because it | |||||
calls <code class="code">verifySettings()</code>. Override this method and | |||||
call <code class="code">setError()</code> within it if you detect any problems in how your | |||||
selector is set up. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
To write custom selector containers one should | To write custom selector containers one should | ||||
extend <code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>. | |||||
Implement the <code>public boolean isSelected(File baseDir, String | |||||
filename, File file)</code> method to do the right thing. Chances are | |||||
you'll want to iterate over the selectors under you, so | |||||
use <code>selectorElements()</code> to get an iterator that will do | |||||
that. | |||||
extend <code class="code">org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>. | |||||
Implement the <code class="code">public boolean isSelected(File baseDir, String filename, File | |||||
file)</code> method to do the right thing. Chances are you'll want to iterate over the | |||||
selectors under you, so use <code class="code">selectorElements()</code> to get an iterator | |||||
that will do that. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
For example to create a selector container that will select files if a | |||||
certain number of contained selectors select, one could write a | |||||
selector as follows: | |||||
For example to create a selector container that will select files if a certain number of | |||||
contained selectors select, one could write a selector as follows: | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
public class MatchNumberSelectors extends BaseSelectorContainer { | public class MatchNumberSelectors extends BaseSelectorContainer { | ||||
@@ -214,28 +204,24 @@ public class MatchNumberSelectors extends BaseSelectorContainer { | |||||
<em>The custom selector</em> | <em>The custom selector</em> | ||||
</p> | </p> | ||||
<p> | <p> | ||||
The custom selector was the pre Ant 1.6 way of defining custom | |||||
selectors. This method is still supported for backward compatibility. | |||||
The custom selector was the pre Ant 1.6 way of defining custom selectors. This method is | |||||
still supported for backward compatibility. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
You can write your own selectors and use them within the selector | |||||
containers by specifying them within the <code><custom></code> | |||||
tag. | |||||
You can write your own selectors and use them within the selector containers by specifying | |||||
them within the <code><custom></code> tag. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
To create a new Custom Selector, you have to create a class that | To create a new Custom Selector, you have to create a class that | ||||
implements <code>org.apache.tools.ant.types.selectors.ExtendFileSelector</code>. | |||||
implements <code class="code">org.apache.tools.ant.types.selectors.ExtendFileSelector</code>. | |||||
The easiest way to do that is through the convenience base | The easiest way to do that is through the convenience base | ||||
class <code>org.apache.tools.ant.types.selectors.BaseExtendSelector</code>, | |||||
which provides all of the methods for | |||||
supporting <code><param></code> tags. First, override | |||||
the <code>isSelected()</code> method, and optionally | |||||
the <code>verifySettings()</code> method. If your custom selector | |||||
requires parameters to be set, you can also override | |||||
the <code>setParameters()</code> method and interpret the parameters | |||||
that are passed in any way you like. Several of the core selectors | |||||
demonstrate how to do that because they can also be used as custom | |||||
selectors. | |||||
class <code class="code">org.apache.tools.ant.types.selectors.BaseExtendSelector</code>, which | |||||
provides all of the methods for supporting <code><param></code> tags. First, override | |||||
the <code class="code">isSelected()</code> method, and optionally | |||||
the <code class="code">verifySettings()</code> method. If your custom selector requires | |||||
parameters to be set, you can also override the <code class="code">setParameters()</code> | |||||
method and interpret the parameters that are passed in any way you like. Several of the core | |||||
selectors demonstrate how to do that because they can also be used as custom selectors. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
Once that is written, you include it in your build file by using | Once that is written, you include it in your build file by using | ||||
@@ -252,7 +238,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer { | |||||
<td>classname</td> | <td>classname</td> | ||||
<td> | <td> | ||||
The name of your class that | The name of your class that | ||||
implements <code>org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
implements <code class="code">org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
</td> | </td> | ||||
<td>Yes</td> | <td>Yes</td> | ||||
</tr> | </tr> | ||||
@@ -277,8 +263,7 @@ public class MatchNumberSelectors extends BaseSelectorContainer { | |||||
</table> | </table> | ||||
<p> | <p> | ||||
Here is how you use <code><custom></code> to use your class as a | |||||
selector: | |||||
Here is how you use <code><custom></code> to use your class as a selector: | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
<fileset dir="${mydir}" includes="**/*"> | <fileset dir="${mydir}" includes="**/*"> | ||||
@@ -290,20 +275,20 @@ public class MatchNumberSelectors extends BaseSelectorContainer { | |||||
<ul> | <ul> | ||||
<li><a href="selectors.html#containsselect">Contains Selector</a> with | <li><a href="selectors.html#containsselect">Contains Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.ContainsSelector</code></li> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.ContainsSelector</code></li> | |||||
<li><a href="selectors.html#dateselect">Date Selector</a> with | <li><a href="selectors.html#dateselect">Date Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.DateSelector</code></li> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.DateSelector</code></li> | |||||
<li><a href="selectors.html#depthselect">Depth Selector</a> with | <li><a href="selectors.html#depthselect">Depth Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.DepthSelector</code></li> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.DepthSelector</code></li> | |||||
<li><a href="selectors.html#filenameselect">Filename Selector</a> with | <li><a href="selectors.html#filenameselect">Filename Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.FilenameSelector</code></li> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.FilenameSelector</code></li> | |||||
<li><a href="selectors.html#sizeselect">Size Selector</a> with | <li><a href="selectors.html#sizeselect">Size Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.SizeSelector</code></li> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.SizeSelector</code></li> | |||||
</ul> | </ul> | ||||
<p> | <p> | ||||
Here is the example from the Depth Selector section rewritten to use | |||||
the selector through <code><custom></code>. | |||||
Here is the example from the Depth Selector section rewritten to use the selector | |||||
through <code><custom></code>. | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
<fileset dir="${doc.path}" includes="**/*"> | <fileset dir="${doc.path}" includes="**/*"> | ||||
@@ -316,16 +301,14 @@ public class MatchNumberSelectors extends BaseSelectorContainer { | |||||
<h3 id="filterreaders">Custom Filter Readers</h3> | <h3 id="filterreaders">Custom Filter Readers</h3> | ||||
<p> | <p> | ||||
Custom filter readers selectors are datatypes that | Custom filter readers selectors are datatypes that | ||||
implement <code>org.apache.tools.ant.types.filters.ChainableReader</code>. | |||||
implement <code class="code">org.apache.tools.ant.types.filters.ChainableReader</code>. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
There is only one method required. <code>Reader chain(Reader | |||||
reader)</code>. This returns a reader that filters input from the | |||||
specified reader. | |||||
There is only one method required, <code class="code">Reader chain(Reader reader)</code>. | |||||
This returns a reader that filters input from the specified reader. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
For example a filterreader that removes every second character could | |||||
be: | |||||
For example a filterreader that removes every second character could be: | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
public class RemoveOddCharacters implements ChainableReader { | public class RemoveOddCharacters implements ChainableReader { | ||||
@@ -349,8 +332,8 @@ public class RemoveOddCharacters implements ChainableReader { | |||||
}</pre> | }</pre> | ||||
<p> | <p> | ||||
For line oriented filters it may be easier to | For line oriented filters it may be easier to | ||||
extend <code>ChainableFilterReader</code> an inner class | |||||
of <code>org.apache.tools.ant.filters.TokenFilter</code>. | |||||
extend <code class="code">ChainableFilterReader</code> an inner class | |||||
of <code class="code">org.apache.tools.ant.filters.TokenFilter</code>. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
For example a filter that appends the line number could be | For example a filter that appends the line number could be | ||||
@@ -27,7 +27,7 @@ | |||||
<h2 id="description">Description</h2> | <h2 id="description">Description</h2> | ||||
<h3>Description</h3> | <h3>Description</h3> | ||||
<p>Allows for a description of the project to be specified that will be | <p>Allows for a description of the project to be specified that will be | ||||
included in the output of the <code>ant -projecthelp</code> command.</p> | |||||
included in the output of the <kbd>ant -projecthelp</kbd> command.</p> | |||||
<h3>Parameters</h3> | <h3>Parameters</h3> | ||||
<p>(none)</p> | <p>(none)</p> | ||||
@@ -28,7 +28,7 @@ | |||||
<p>A FileSet is a group of files. These files can be found in a directory tree starting in a | <p>A FileSet is a group of files. These files can be found in a directory tree starting in a | ||||
base directory and are matched by patterns taken from a number | base directory and are matched by patterns taken from a number | ||||
of <a href="patternset.html">PatternSets</a> and <a href="selectors.html">Selectors</a>.</p> | of <a href="patternset.html">PatternSets</a> and <a href="selectors.html">Selectors</a>.</p> | ||||
<p>PatternSets can be specified as nested q<code><patternset></code> elements. In | |||||
<p>PatternSets can be specified as nested <code><patternset></code> elements. In | |||||
addition, FileSet holds an implicit PatternSet and supports the | addition, FileSet holds an implicit PatternSet and supports the | ||||
nested <code><include></code>, <code><includesfile></code>, <code><exclude></code> | nested <code><include></code>, <code><includesfile></code>, <code><exclude></code> | ||||
and <code><excludesfile></code> elements of PatternSet directly, as well as PatternSet's | and <code><excludesfile></code> elements of PatternSet directly, as well as PatternSet's | ||||
@@ -27,7 +27,7 @@ | |||||
that contained the string <q>blee</q> from the first 10 lines of a text file <samp>foo</samp> | that contained the string <q>blee</q> from the first 10 lines of a text file <samp>foo</samp> | ||||
(<em>you wouldn't want to filter a binary file</em>) to a file <samp>bar</samp>, you would do | (<em>you wouldn't want to filter a binary file</em>) to a file <samp>bar</samp>, you would do | ||||
something like:</p> | something like:</p> | ||||
<pre>cat foo|head -n10|grep blee > bar</pre> | |||||
<pre class="input">cat foo|head -n10|grep blee > bar</pre> | |||||
<p>Apache Ant was not flexible enough. There was no way for the <code><copy></code> task to | <p>Apache Ant was not flexible enough. There was no way for the <code><copy></code> task to | ||||
do something similar. If you wanted the <code><copy></code> task to get the first 10 lines, | do something similar. If you wanted the <code><copy></code> task to get the first 10 lines, | ||||
you would have had to create special attributes:</p> | you would have had to create special attributes:</p> | ||||
@@ -42,8 +42,8 @@ and plug them in.</p> | |||||
<p>The solution was to refactor data transformation oriented tasks to support FilterChains. A | <p>The solution was to refactor data transformation oriented tasks to support FilterChains. A | ||||
FilterChain is a group of ordered FilterReaders. Users can define their own FilterReaders by just | FilterChain is a group of ordered FilterReaders. Users can define their own FilterReaders by just | ||||
extending the <code>java.io.FilterReader</code> class. Such custom FilterReaders can be easily | |||||
plugged in as nested elements of <code><filterchain></code> by | |||||
extending the <code class="code">java.io.FilterReader</code> class. Such custom FilterReaders can | |||||
be easily plugged in as nested elements of <code><filterchain></code> by | |||||
using <code><filterreader></code> elements.</p> | using <code><filterreader></code> elements.</p> | ||||
<p>Example:</p> | <p>Example:</p> | ||||
<pre> | <pre> | ||||
@@ -119,8 +119,9 @@ elements are defined in the build file using this. Please note that built in fi | |||||
also be defined using this syntax.</p> | also be defined using this syntax.</p> | ||||
<p>A FilterReader element must be supplied with a class name as an attribute value. The class | <p>A FilterReader element must be supplied with a class name as an attribute value. The class | ||||
resolved by this name must extend <code>java.io.FilterReader</code>. If the custom filter reader | |||||
needs to be parameterized, it must implement <code>org.apache.tools.type.Parameterizable</code>.</p> | |||||
resolved by this name must extend <code class="code">java.io.FilterReader</code>. If the custom | |||||
filter reader needs to be parameterized, it must | |||||
implement <code class="code">org.apache.tools.type.Parameterizable</code>.</p> | |||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -206,8 +207,8 @@ is substituted with the property's actual value.</p> | |||||
<h4>Example</h4> | <h4>Example</h4> | ||||
<p>This results in the property <code>modifiedmessage</code> holding the value "All these | |||||
moments will be lost in time, like teardrops in the rain"</p> | |||||
<p>This results in the property <code>modifiedmessage</code> holding the value <q>All these moments | |||||
will be lost in time, like teardrops in the rain</q></p> | |||||
<pre> | <pre> | ||||
<echo message="All these moments will be lost in time, like teardrops in the ${weather}" | <echo message="All these moments will be lost in time, like teardrops in the ${weather}" | ||||
file="loadfile1.tmp"/> | file="loadfile1.tmp"/> | ||||
@@ -955,8 +956,8 @@ extracted)</p> | |||||
<p><em>Since Ant 1.8.0</em></p> | <p><em>Since Ant 1.8.0</em></p> | ||||
<p>The sort filter reads all lines and sorts them. The sort order can be reversed and it is | <p>The sort filter reads all lines and sorts them. The sort order can be reversed and it is | ||||
possible to specify a custom implementation of the <code>java.util.Comparator</code> interface | |||||
to get even more control.</p> | |||||
possible to specify a custom implementation of the <code class="code">java.util.Comparator</code> | |||||
interface to get even more control.</p> | |||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -972,8 +973,8 @@ to get even more control.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>comparator</td> | <td>comparator</td> | ||||
<td>Class name of a class that implements <code>java.util.Comparator</code> for Strings. | |||||
This class will be used to determine the sort order of lines.</td> | |||||
<td>Class name of a class that implements <code class="code">java.util.Comparator</code> for | |||||
Strings. This class will be used to determine the sort order of lines.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -1023,12 +1024,12 @@ them into <samp>build</samp> location. | |||||
<p> | <p> | ||||
Sort all files <samp>*.txt</samp> from <samp>src</samp> location using as sorting | Sort all files <samp>*.txt</samp> from <samp>src</samp> location using as sorting | ||||
criterium <code>EvenFirstCmp</code> class, that sorts the file lines putting even lines first | |||||
then odd lines for example. The modified files are copied into <samp>build</samp> | |||||
location. The <code>EvenFirstCmp</code>, has to an instanciable class | |||||
via <code>Class.newInstance()</code>, therefore in case of inner class has to | |||||
be <em>static</em>. It also has to implement <code>java.util.Comparator</code> interface, for | |||||
example: | |||||
criterium <code class="code">EvenFirstCmp</code> class, that sorts the file lines putting even lines | |||||
first then odd lines for example. The modified files are copied into <samp>build</samp> | |||||
location. The <code class="code">EvenFirstCmp</code> has to an instanciable class | |||||
via <code class="code">Class.newInstance()</code>, therefore in case of inner class has to | |||||
be <em>static</em>. It also has to implement <code class="code">java.util.Comparator</code> | |||||
interface, for example: | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
@@ -1166,9 +1167,9 @@ this on very large input.</p> | |||||
</tokenfilter></pre> | </tokenfilter></pre> | ||||
<h4 id="stringtokenizer">StringTokenizer</h4> | <h4 id="stringtokenizer">StringTokenizer</h4> | ||||
<p>This tokenizer is based on <code>java.util.StringTokenizer</code>. It splits up the input | |||||
into strings separated by white space, or by a specified list of delimiting characters. If the | |||||
stream starts with delimiter characters, the first token will be the empty string (unless | |||||
<p>This tokenizer is based on <code class="code">java.util.StringTokenizer</code>. It splits up the | |||||
input into strings separated by white space, or by a specified list of delimiting characters. If | |||||
the stream starts with delimiter characters, the first token will be the empty string (unless | |||||
the <var>delimsaretokens</var> attribute is used).</p> | the <var>delimsaretokens</var> attribute is used).</p> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -1430,8 +1431,7 @@ the <a href="../Tasks/native2ascii.html">native2ascii</a> task.</p> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>reverse</td> | <td>reverse</td> | ||||
<td>Reverse the sense of the conversion, | |||||
i.e. convert from ASCII to native.</td> | |||||
<td>Reverse the sense of the conversion, i.e. convert from ASCII to native.</td> | |||||
<td>No</td> | <td>No</td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -1456,9 +1456,10 @@ See the <a href="../Tasks/script.html">Script</a> task for an explanation of scr | |||||
dependencies. | dependencies. | ||||
</p> | </p> | ||||
<p> | <p> | ||||
The script is provided with an object <samp>self</samp> that has <code>getToken()</code> | |||||
and <code>setToken(String)</code> methods. The <code>getToken()</code> method returns the current | |||||
token. The <code>setToken(String)</code> method replaces the current token. | |||||
The script is provided with an object <samp class="code">self</samp> that | |||||
has <code class="code">getToken()</code> and <code class="code">setToken(String)</code> methods. | |||||
The <code class="code">getToken()</code> method returns the current | |||||
token. The <code class="code">setToken(String)</code> method replaces the current token. | |||||
</p> | </p> | ||||
<p> | <p> | ||||
This filter may be used directly within a <code>filterchain</code>. | This filter may be used directly within a <code>filterchain</code>. | ||||
@@ -1538,8 +1539,8 @@ the <a href="../Tasks/script.html">script</a> task on how to use this element. | |||||
<h4 id="custom">Custom tokenizers and string filters</h4> | <h4 id="custom">Custom tokenizers and string filters</h4> | ||||
<p>Custom string filters and tokenizers may be plugged in by extending the | <p>Custom string filters and tokenizers may be plugged in by extending the | ||||
interfaces <code>org.apache.tools.ant.filters.TokenFilter.Filter</code> | |||||
and <code>org.apache.tools.ant.util.Tokenizer</code> respectly.</p> | |||||
interfaces <code class="code">org.apache.tools.ant.filters.TokenFilter.Filter</code> | |||||
and <code class="code">org.apache.tools.ant.util.Tokenizer</code> respectly.</p> | |||||
<p>They are defined in the build file using <code><typedef/></code>. For example, a string | <p>They are defined in the build file using <code><typedef/></code>. For example, a string | ||||
filter that capitalizes words may be declared as:</p> | filter that capitalizes words may be declared as:</p> | ||||
@@ -32,9 +32,10 @@ may want to specify the target files, either to help Apache Ant or to get an ext | |||||
functionality.</p> | functionality.</p> | ||||
<p>While source files are usually specified as <a href="fileset.html">fileset</a>s, you don't | <p>While source files are usually specified as <a href="fileset.html">fileset</a>s, you don't | ||||
specify target files directly—instead, you tell Ant how to find the target file(s) for one | specify target files directly—instead, you tell Ant how to find the target file(s) for one | ||||
source file. An instance of <code>org.apache.tools.ant.util.FileNameMapper</code> is responsible for | |||||
this. It constructs target file names based on rules that can be parameterized with <var>from</var> | |||||
and <var>to</var> attributes—the exact meaning of which is implementation-dependent.</p> | |||||
source file. An instance of <code class="code">org.apache.tools.ant.util.FileNameMapper</code> is | |||||
responsible for this. It constructs target file names based on rules that can be parameterized | |||||
with <var>from</var> and <var>to</var> attributes—the exact meaning of which is | |||||
implementation-dependent.</p> | |||||
<p>These instances are defined in <code><mapper></code> elements with the following | <p>These instances are defined in <code><mapper></code> elements with the following | ||||
attributes:</p> | attributes:</p> | ||||
<table class="attr"> | <table class="attr"> | ||||
@@ -88,16 +89,16 @@ is, a <a href="../using.html#path">path</a>-like structure.</p> | |||||
<p><em>Since Ant 1.7.0</em>, nested File Mappers can be supplied via | <p><em>Since Ant 1.7.0</em>, nested File Mappers can be supplied via | ||||
either <code><mapper></code> elements | either <code><mapper></code> elements | ||||
or <a href="../Tasks/typedef.html"><code><typedef></code></a>'d implementations | or <a href="../Tasks/typedef.html"><code><typedef></code></a>'d implementations | ||||
of <code>org.apache.tools.ant.util.FileNameMapper</code>. If nested File Mappers are specified by | |||||
either means, the mapper will be implicitly configured as a <a href="#composite-mapper">composite | |||||
mapper</a>.</p> | |||||
of <code class="code">org.apache.tools.ant.util.FileNameMapper</code>. If nested File Mappers are | |||||
specified by either means, the mapper will be implicitly configured as | |||||
a <a href="#composite-mapper">composite mapper</a>.</p> | |||||
<h3>The built-in mapper types</h3> | <h3>The built-in mapper types</h3> | ||||
<p>All built-in mappers are case-sensitive.</p> | <p>All built-in mappers are case-sensitive.</p> | ||||
<p><em>Since Ant 1.7.0</em>, each of the built-in mapper implementation types is directly accessible | <p><em>Since Ant 1.7.0</em>, each of the built-in mapper implementation types is directly accessible | ||||
using a specific tagname. This makes it possible for filename mappers to support attributes in | using a specific tagname. This makes it possible for filename mappers to support attributes in | ||||
addition to the generally available <var>to</var> and <var>from</var>.<br/> The <code><mapper | |||||
type|classname="..."></code> usage form remains valid for reasons of backward | |||||
compatibility.</p> | |||||
addition to the generally available <var>to</var> and <var>from</var>.<br/> | |||||
The <code><mapper <var>type</var>|<var>classname</var>="..."></code> usage form | |||||
remains valid for reasons of backward compatibility.</p> | |||||
<!-- --> | <!-- --> | ||||
<!-- Identity Mapper --> | <!-- Identity Mapper --> | ||||
@@ -330,10 +331,10 @@ case).</p> | |||||
<p>Note that you need to escape a dollar-sign (<q>$</q>) with another dollar-sign in Ant.</p> | <p>Note that you need to escape a dollar-sign (<q>$</q>) with another dollar-sign in Ant.</p> | ||||
<p>The regexp mapper needs a supporting library and an implementation | <p>The regexp mapper needs a supporting library and an implementation | ||||
of <code>org.apache.tools.ant.util.regexp.RegexpMatcher</code> that hides the specifics of the | |||||
library. <em>Since Ant 1.8.0</em>, Java 1.4 or later is required, so the implementation based on | |||||
the <code>java.util.regex</code> package is always be available. You can still use the now retired | |||||
Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in | |||||
of <code class="code">org.apache.tools.ant.util.regexp.RegexpMatcher</code> that hides the specifics | |||||
of the library. <em>Since Ant 1.8.0</em>, Java 1.4 or later is required, so the implementation based | |||||
on the <code class="code">java.util.regex</code> package is always be available. You can still use | |||||
the now retired Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in | |||||
your <code>CLASSPATH</code>.</p> | your <code>CLASSPATH</code>.</p> | ||||
<p>For information about using <a href="https://savannah.gnu.org/projects/gnu-regexp/" | <p>For information about using <a href="https://savannah.gnu.org/projects/gnu-regexp/" | ||||
@@ -344,17 +345,17 @@ target="_top">your mileage may vary</a> with different regexp engines.</p> | |||||
<p>If you want to use one of the <a href="../install.html#librarydependencies">regular expression | <p>If you want to use one of the <a href="../install.html#librarydependencies">regular expression | ||||
libraries</a> other than <code>java.util.regex</code> you need to also use the | libraries</a> other than <code>java.util.regex</code> you need to also use the | ||||
corresponding <code>ant-[apache-oro, apache-regexp].jar</code> from the Ant release you are using. | |||||
corresponding <samp>ant-[apache-oro, apache-regexp].jar</samp> from the Ant release you are using. | |||||
Make sure that both will be loaded from the same classpath, that is either put them into | Make sure that both will be loaded from the same classpath, that is either put them into | ||||
your <code>CLASSPATH</code>, <samp>ANT_HOME/lib</samp> directory or a | your <code>CLASSPATH</code>, <samp>ANT_HOME/lib</samp> directory or a | ||||
nested <code><classpath></code> element of the mapper—you cannot | nested <code><classpath></code> element of the mapper—you cannot | ||||
have <code>ant-[apache-oro, apache-regexp].jar</code> in <samp>ANT_HOME/lib</samp> and the library | |||||
have <samp>ant-[apache-oro, apache-regexp].jar</samp> in <samp>ANT_HOME/lib</samp> and the library | |||||
in a nested <code><classpath></code>.</p> | in a nested <code><classpath></code>.</p> | ||||
<p>Ant will choose the regular expression library based on the following algorithm:</p> | <p>Ant will choose the regular expression library based on the following algorithm:</p> | ||||
<ul> | <ul> | ||||
<li>If the system property <code>ant.regexp.matcherimpl</code> has been set, it is taken as the name | <li>If the system property <code>ant.regexp.matcherimpl</code> has been set, it is taken as the name | ||||
of the class implementing <code>org.apache.tools.ant.util.regexp.RegexpMatcher</code> that should be | |||||
used.</li> | |||||
of the class implementing <code class="code">org.apache.tools.ant.util.regexp.RegexpMatcher</code> | |||||
that should be used.</li> | |||||
<li>If it has not been set, uses the JDK 1.4 classes.</li> | <li>If it has not been set, uses the JDK 1.4 classes.</li> | ||||
</ul> | </ul> | ||||
@@ -590,7 +591,7 @@ mappers; prior to Ant 1.8.0 the order has been undefined.</p> | |||||
<td><code>foo.bar.A</code></td> | <td><code>foo.bar.A</code></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>The composite mapper has no corresponding <code><mapper <var>type</var>></code> | |||||
<p>The composite mapper has no corresponding <code><mapper></code> <var>type</var> | |||||
attribute.</p> | attribute.</p> | ||||
<!-- --> | <!-- --> | ||||
@@ -633,7 +634,7 @@ operation. The <var>to</var> and <var>from</var> attributes are ignored.</p> | |||||
<td><code>new/path/B.java2</code></td> | <td><code>new/path/B.java2</code></td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>The chained mapper has no corresponding <code><mapper <var>type</var>></code> | |||||
<p>The chained mapper has no corresponding <code><mapper></code> <var>type</var> | |||||
attribute.</p> | attribute.</p> | ||||
<!-- --> | <!-- --> | ||||
@@ -678,9 +679,7 @@ file name.</p> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>The filtermapper has no corresponding | |||||
<code><mapper <var>type</var>></code> attribute. | |||||
</p> | |||||
<p>The filtermapper has no corresponding <code><mapper></code> <var>type</var> attribute.</p> | |||||
<!-- --> | <!-- --> | ||||
<!-- Script Mapper --> | <!-- Script Mapper --> | ||||
@@ -742,8 +741,7 @@ dependencies.</p> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>This filename mapper can take a nested <classpath> element. See | <p>This filename mapper can take a nested <classpath> element. See | ||||
the <a href="../Tasks/script.html">script</a> task on how to use this element. | |||||
</p> | |||||
the <a href="../Tasks/script.html">script</a> task on how to use this element.</p> | |||||
<h5>Example</h5> | <h5>Example</h5> | ||||
<pre> | <pre> | ||||
@@ -793,7 +791,7 @@ every source file, with the list of mapped names reset after every invocation.</ | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>The scriptmapper has no corresponding <code><mapper <var>type</var>></code> attribute.</p> | |||||
<p>The scriptmapper has no corresponding <code><mapper></code> <var>type</var> attribute.</p> | |||||
<h4 id="firstmatch-mapper">firstmatchmapper</h4> | <h4 id="firstmatch-mapper">firstmatchmapper</h4> | ||||
<p><em>Since Ant 1.8.0</em></p> | <p><em>Since Ant 1.8.0</em></p> | ||||
@@ -822,7 +820,7 @@ collects the results of all matching children.</p> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>The firstmatchmapper has no corresponding <code><mapper <var>type</var>></code> | |||||
<p>The firstmatchmapper has no corresponding <code><mapper></code> <var>type</var> | |||||
attribute.</p> | attribute.</p> | ||||
<h4 id="cutdirs-mapper">cutdirsmapper</h4> | <h4 id="cutdirs-mapper">cutdirsmapper</h4> | ||||
@@ -843,7 +841,7 @@ attribute.</p> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
<p>The cutdirsmapper has no corresponding <code><mapper <var>type</var>></code> attribute.</p> | |||||
<p>The cutdirsmapper has no corresponding <code><mapper></code> <var>type</var> attribute.</p> | |||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
@@ -184,17 +184,17 @@ | |||||
<h3>Mixing Elements from Different Namespaces</h3> | <h3>Mixing Elements from Different Namespaces</h3> | ||||
<p> | <p> | ||||
Now comes the difficult part: elements from different namespaces can be woven together | |||||
under certain circumstances. This has a lot to do with the Ant | |||||
1.6 <a href="../develop.html#nestedtype">add type introspection rules</a>: Ant types and | |||||
tasks are now free to accept arbitrary named types as nested elements, as long as the | |||||
concrete type implements the interface expected by the task/type. The most obvious example | |||||
for this is the <code><condition></code> task, which supports various nested | |||||
conditions, all of which extend the interface <code>Condition</code>. To integrate a | |||||
custom condition in Ant, you can now simply <code><typedef></code> the condition, | |||||
and then use it anywhere nested conditions are allowed (assuming the containing element | |||||
has a generic <code>add(Condition)</code> or <code>addConfigured(Condition)</code> | |||||
method): | |||||
Now comes the difficult part: elements from different namespaces can be woven together under | |||||
certain circumstances. This has a lot to do with the Ant | |||||
1.6 <a href="../develop.html#nestedtype">add type introspection rules</a>: Ant types and tasks | |||||
are now free to accept arbitrary named types as nested elements, as long as the concrete type | |||||
implements the interface expected by the task/type. The most obvious example for this is | |||||
the <code><condition></code> task, which supports various nested conditions, all of | |||||
which extend the interface <code class="code">Condition</code>. To integrate a custom | |||||
condition in Ant, you can now simply <code><typedef></code> the condition, and then use | |||||
it anywhere nested conditions are allowed (assuming the containing element has a | |||||
generic <code class="code">add(Condition)</code> | |||||
or <code class="code">addConfigured(Condition)</code> method): | |||||
</p> | </p> | ||||
<pre> | <pre> | ||||
<typedef resource="org/example/conditions.properties" uri="<a href="http://example.org/conditions">http://example.org/conditions</a>"/> | <typedef resource="org/example/conditions.properties" uri="<a href="http://example.org/conditions">http://example.org/conditions</a>"/> | ||||
@@ -134,9 +134,9 @@ are revoked. If the <var>actions</var> are left empty all actions match, and ar | |||||
<grant class="java.util.PropertyPermission" name="user.home" action="read,write"/> | <grant class="java.util.PropertyPermission" name="user.home" action="read,write"/> | ||||
</permissions> | </permissions> | ||||
</pre> | </pre> | ||||
<p>Grants the base set of permissions with the addition of a <code>SocketPermission</code> to | |||||
connect to <samp>foo.bar.com</samp> and the permission to read and write | |||||
the <code>user.home</code> system property.</p> | |||||
<p>Grants the base set of permissions with the addition of | |||||
a <code class="code">SocketPermission</code> to connect to <samp>foo.bar.com</samp> and the | |||||
permission to read and write the <code>user.home</code> system property.</p> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -57,12 +57,12 @@ dependencies</a> concerning the supporting libraries.</p> | |||||
<p>The property <code>ant.regexp.regexpimpl</code> governs which regular expression implementation | <p>The property <code>ant.regexp.regexpimpl</code> governs which regular expression implementation | ||||
will be chosen. Possible values for this property are:</p> | will be chosen. Possible values for this property are:</p> | ||||
<ul> | <ul> | ||||
<li><code>org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp</code></li> | |||||
<li><code>org.apache.tools.ant.util.regexp.JakartaOroRegexp</code></li> | |||||
<li><code>org.apache.tools.ant.util.regexp.JakartaRegexpRegexp</code></li> | |||||
<li><code class="code">org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp</code></li> | |||||
<li><code class="code">org.apache.tools.ant.util.regexp.JakartaOroRegexp</code></li> | |||||
<li><code class="code">org.apache.tools.ant.util.regexp.JakartaRegexpRegexp</code></li> | |||||
</ul> | </ul> | ||||
<p>It can also be another implementation of the | <p>It can also be another implementation of the | ||||
interface <code>org.apache.tools.ant.util.regexp.Regexp</code>. | |||||
interface <code class="code">org.apache.tools.ant.util.regexp.Regexp</code>. | |||||
If <code>ant.regexp.regexpimpl</code> is not defined, Ant uses Jdk14Regexp as this is always | If <code>ant.regexp.regexpimpl</code> is not defined, Ant uses Jdk14Regexp as this is always | ||||
available.</p> | available.</p> | ||||
<p> | <p> | ||||
@@ -1015,11 +1015,11 @@ collection.</p> | |||||
<p>A single resource collection is required.</p> | <p>A single resource collection is required.</p> | ||||
<h4 id="tokens">tokens</h4> | <h4 id="tokens">tokens</h4> | ||||
<p>Includes the <a href="#string">string</a> tokens gathered from a nested resource | |||||
collection. Uses the same tokenizers supported by | |||||
<p>Includes the <a href="#string">string</a> tokens gathered from a nested resource collection. Uses | |||||
the same tokenizers supported by | |||||
the <a href="filterchain.html#tokenfilter">TokenFilter</a>. Imaginative use of this resource | the <a href="filterchain.html#tokenfilter">TokenFilter</a>. Imaginative use of this resource | ||||
collection can implement equivalents for such Unix functions as <code>sort</code>, <code>grep | |||||
-c</code>, <code>wc</code> and <code>wc -l</code>.</p> | |||||
collection can implement equivalents for such Unix functions as <kbd>sort</kbd>, <kbd>grep | |||||
-c</kbd>, <kbd>wc</kbd> and <kbd>wc -l</kbd>.</p> | |||||
<table class="attr"> | <table class="attr"> | ||||
<tr> | <tr> | ||||
<th>Attribute</th> | <th>Attribute</th> | ||||
@@ -1056,7 +1056,7 @@ collection can implement equivalents for such Unix functions as <code>sort</code | |||||
</sort> | </sort> | ||||
</union> | </union> | ||||
</concat></pre> | </concat></pre> | ||||
<p>Implements Unix <code>sort -u</code> against resource collection <q>input</q>.</p> | |||||
<p>Implements Unix <kbd>sort -u</kbd> against resource collection <q>input</q>.</p> | |||||
<h4 id="setlogic">Set operations</h4> | <h4 id="setlogic">Set operations</h4> | ||||
<p>The following resource collections implement set operations:</p> | <p>The following resource collections implement set operations:</p> | ||||
@@ -45,15 +45,15 @@ | |||||
example.</p> | example.</p> | ||||
<p>To create a new Custom Selector, you have to create a class that | <p>To create a new Custom Selector, you have to create a class that | ||||
implements <code>org.apache.tools.ant.types.selectors.ExtendFileSelector</code>. The | |||||
easiest way to do that is through the convenience base | |||||
class <code>org.apache.tools.ant.types.selectors.BaseExtendSelector</code>, which | |||||
provides all of the methods for supporting <code><param></code> tags. First, | |||||
override the <code>isSelected()</code> method, and optionally | |||||
the <code>verifySettings()</code> method. If your custom selector requires parameters to | |||||
be set, you can also override the <code>setParameters()</code> method and interpret the | |||||
parameters that are passed in any way you like. Several of the core selectors | |||||
demonstrate how to do that because they can also be used as custom selectors.</p> | |||||
implements <code class="code">org.apache.tools.ant.types.selectors.ExtendFileSelector</code>. | |||||
The easiest way to do that is through the convenience base | |||||
class <code class="code">org.apache.tools.ant.types.selectors.BaseExtendSelector</code>, | |||||
which provides all of the methods for supporting <code><param></code> tags. First, | |||||
override the <code class="code">isSelected()</code> method, and optionally | |||||
the <code class="code">verifySettings()</code> method. If your custom selector requires | |||||
parameters to be set, you can also override the <code class="code">setParameters()</code> | |||||
method and interpret the parameters that are passed in any way you like. Several of the core | |||||
selectors demonstrate how to do that because they can also be used as custom selectors.</p> | |||||
<li>Core Selectors | <li>Core Selectors | ||||
@@ -62,37 +62,40 @@ | |||||
<ul> | <ul> | ||||
<li><p>First, create a class that | <li><p>First, create a class that | ||||
implements <code>org.apache.tools.ant.types.selectors.FileSelector</code>. You can | |||||
either choose to implement all methods yourself from scratch, or you can | |||||
extend <code>org.apache.tools.ant.types.selectors.BaseSelector</code> instead, a | |||||
convenience class that provides reasonable default behaviour for many methods.</p> | |||||
<p>There is only one method required. <code>public boolean isSelected(File basedir, | |||||
String filename, File file)</code> is the real purpose of the whole exercise. It | |||||
returns <q>true</q> or <q>false</q> depending on whether the given file should be | |||||
selected from the list or not.</p> | |||||
<p>If you are using <code>org.apache.tools.ant.types.selectors.BaseSelector</code> | |||||
there are also some predefined behaviours you can take advantage of. Any time you | |||||
encounter a problem when setting attributes or adding tags, you can | |||||
call <code>setError(String errmsg)</code> and the class will know that there is a | |||||
problem. Then, at the top of your <code>isSelected()</code> method | |||||
call <code>validate()</code> and a BuildException will be thrown with the contents | |||||
of your error message. The <code>validate()</code> method also gives you a last | |||||
chance to check your settings for consistency because it | |||||
calls <code>verifySettings()</code>. Override this method and | |||||
call <code>setError()</code> within it if you detect any problems in how your | |||||
selector is set up.</p> | |||||
<p>You may also want to override <code>toString()</code>.</p></li> | |||||
<li>Put an <code>add</code> method for your selector | |||||
in <code>org.apache.tools.ant.types.selectors.SelectorContainer</code>. This is an | |||||
interface, so you will also have to add an implementation for the method in the | |||||
classes which implement it, | |||||
namely <code>org.apache.tools.ant.types.AbstractFileSet</code>, <code>org.apache.tools.ant.taskdefs.MatchingTask</code> | |||||
and <code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>. Once | |||||
it is in there, it will be available everywhere that core selectors are | |||||
implements <code class="code">org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
You can either choose to implement all methods yourself from scratch, or you can | |||||
extend <code class="code">org.apache.tools.ant.types.selectors.BaseSelector</code> | |||||
instead, a convenience class that provides reasonable default behaviour for many | |||||
methods.</p> | |||||
<p>There is only one method required. <code class="code">public boolean isSelected(File | |||||
basedir, String filename, File file)</code> is the real purpose of the whole | |||||
exercise. It returns <q>true</q> or <q>false</q> depending on whether the given file | |||||
should be selected from the list or not.</p> | |||||
<p>If you are | |||||
using <code class="code">org.apache.tools.ant.types.selectors.BaseSelector</code> there | |||||
are also some predefined behaviours you can take advantage of. Any time you encounter a | |||||
problem when setting attributes or adding tags, you can | |||||
call <code class="code">setError(String errmsg)</code> and the class will know that | |||||
there is a problem. Then, at the top of your <code class="code">isSelected()</code> | |||||
method call <code class="code">validate()</code> and a <code>BuildException</code> will | |||||
be thrown with the contents of your error | |||||
message. The <code class="code">validate()</code> method also gives you a last chance to | |||||
check your settings for consistency because it | |||||
calls <code class="code">verifySettings()</code>. Override this method and | |||||
call <code class="code">setError()</code> within it if you detect any problems in how | |||||
your selector is set up.</p> | |||||
<p>You may also want to override <code class="code">toString()</code>.</p></li> | |||||
<li>Put an <code class="code">add()</code> method for your selector | |||||
in <code class="code">org.apache.tools.ant.types.selectors.SelectorContainer</code>. | |||||
This is an interface, so you will also have to add an implementation for the method in | |||||
the classes which implement it, | |||||
namely <code class="code">org.apache.tools.ant.types.AbstractFileSet</code>, <code class="code">org.apache.tools.ant.taskdefs.MatchingTask</code> | |||||
and <code class="code">org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>. | |||||
Once it is in there, it will be available everywhere that core selectors are | |||||
appropriate.</li> | appropriate.</li> | ||||
</ul> | </ul> | ||||
@@ -100,18 +103,18 @@ | |||||
<p>Got an idea for a new Selector Container? Creating a new one is no problem:</p> | <p>Got an idea for a new Selector Container? Creating a new one is no problem:</p> | ||||
<ul> | <ul> | ||||
<li>Create a new class that | <li>Create a new class that | ||||
implements <code>org.apache.tools.ant.types.selectors.SelectorContainer</code>. | |||||
implements <code class="code">org.apache.tools.ant.types.selectors.SelectorContainer</code>. | |||||
This will ensure that your new Container can access any new selectors that come | This will ensure that your new Container can access any new selectors that come | ||||
along. Again, there is a convenience class available for you | along. Again, there is a convenience class available for you | ||||
called <code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.</li> | |||||
<li>Implement the <code>public boolean isSelected(String filename, File file)</code> | |||||
method to do the right thing. Chances are you'll want to iterate over the selectors | |||||
under you, so use <code>selectorElements()</code> to get an iterator that will do | |||||
that.</li> | |||||
<li>Again, put an <code>add</code> method for your container | |||||
in <code>org.apache.tools.ant.types.selectors.SelectorContainer</code> and its | |||||
implementations <code>org.apache.tools.ant.types.AbstractFileSet</code> | |||||
and <code>org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.</li> | |||||
called <code class="code">org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.</li> | |||||
<li>Implement the <code class="code">public boolean isSelected(String filename, File | |||||
file)</code> method to do the right thing. Chances are you'll want to iterate over the | |||||
selectors under you, so use <code class="code">selectorElements()</code> to get an | |||||
iterator that will do that.</li> | |||||
<li>Again, put an <code class="code">add()</code> method for your container | |||||
in <code class="code">org.apache.tools.ant.types.selectors.SelectorContainer</code> and | |||||
its implementations <code class="code">org.apache.tools.ant.types.AbstractFileSet</code> | |||||
and <code class="code">org.apache.tools.ant.types.selectors.BaseSelectorContainer</code>.</li> | |||||
</ul> | </ul> | ||||
</ol> | </ol> | ||||
@@ -119,16 +122,16 @@ | |||||
<p>For a robust component (and selectors are (Project)Components) tests are necessary. For | <p>For a robust component (and selectors are (Project)Components) tests are necessary. For | ||||
testing Tasks we use JUnit Tests and Rules—more | testing Tasks we use JUnit Tests and Rules—more | ||||
specific <code>org.apache.tools.ant.BuildFileRule extends | |||||
org.junit.rules.ExternalResource</code>. Some of its features like configure the (test) | |||||
project by reading its buildfile and execute targets we need for selector tests | |||||
also. Therefore we use that BuildFileRule. But testing selectors requires some more work: | |||||
having a set of files, instantiate and configure the selector, check the selection work and | |||||
more. Because we usually extend <code>BaseExtendSelector</code> its features have to be | |||||
tested also (e.g. <code>setError()</code>).</p> | |||||
specific <code class="code">org.apache.tools.ant.BuildFileRule extends | |||||
org.junit.rules.ExternalResource</code>. Some of its features like configure the (test) project | |||||
by reading its buildfile and execute targets we need for selector tests also. Therefore we use | |||||
that BuildFileRule. But testing selectors requires some more work: having a set of files, | |||||
instantiate and configure the selector, check the selection work and more. Because we usually | |||||
extend <code class="code">BaseExtendSelector</code> its features have to be tested also | |||||
(e.g. <code class="code">setError()</code>).</p> | |||||
<p>That's why we have a test rule for doing our selector | <p>That's why we have a test rule for doing our selector | ||||
tests: <code>org.apache.tools.ant.types.selectors.BaseSelectorRule</code>.</p> | |||||
tests: <code class="code">org.apache.tools.ant.types.selectors.BaseSelectorRule</code>.</p> | |||||
<p>This class extends ExternalResource and therefore can included in the set of Ant's unit | <p>This class extends ExternalResource and therefore can included in the set of Ant's unit | ||||
tests. It holds an instance of preconfigured BuildFileRule. Configuration is done by parsing | tests. It holds an instance of preconfigured BuildFileRule. Configuration is done by parsing | ||||
@@ -180,32 +183,32 @@ public class MySelectorTest { | |||||
[junit] at junit.framework.Assert.assertEquals(Assert.java:81) | [junit] at junit.framework.Assert.assertEquals(Assert.java:81) | ||||
[junit] at org.apache.tools.ant.types.selectors.BaseSelectorTest.performTest(BaseSelectorTest.java:194)</pre> | [junit] at org.apache.tools.ant.types.selectors.BaseSelectorTest.performTest(BaseSelectorTest.java:194)</pre> | ||||
<p>Described above the test class should provide a <code>getInstance()</code> method. But | |||||
that isn't used here. The used <code>getSelector()</code> method is implemented in the base | |||||
class and gives an instance of an Ant Project to the selector. This is usually done inside | |||||
normal build file runs, but not inside this special environment, so this method gives the | |||||
selector the ability to use its own Project object (<code>getProject()</code>), for example | |||||
for logging.</p> | |||||
<p>Described above the test class should provide a <code class="code">getInstance()</code> | |||||
method. But that isn't used here. The used <code class="code">getSelector()</code> method is | |||||
implemented in the base class and gives an instance of an Ant Project to the selector. This is | |||||
usually done inside normal build file runs, but not inside this special environment, so this | |||||
method gives the selector the ability to use its own Project object | |||||
(<code class="code">getProject()</code>), for example for logging.</p> | |||||
<h3>Logging</h3> | <h3>Logging</h3> | ||||
<p>During development and maybe later you sometimes need the output of information. | |||||
Therefore Logging is needed. Because the selector extends BaseExtendSelector or directly | |||||
BaseSelector it is an Ant <code>DataType</code> and therefore | |||||
a <code>ProjectComponent</code>.<br/> That means that you have access to the project object | |||||
and its logging capability. <code>ProjectComponent</code> itself | |||||
provides <code>log()</code> methods which will do the access to the project | |||||
<p>During development and maybe later you sometimes need the output of information. Therefore | |||||
Logging is needed. Because the selector extends BaseExtendSelector or directly BaseSelector it | |||||
is an Ant <code class="code">DataType</code> and therefore | |||||
a <code class="code">ProjectComponent</code>.<br/> That means that you have access to the | |||||
project object and its logging capability. <code class="code">ProjectComponent</code> itself | |||||
provides <code class="code">log()</code> methods which will do the access to the project | |||||
instance. Logging is therefore done simply with:</p> | instance. Logging is therefore done simply with:</p> | ||||
<pre>log("message");</pre> | <pre>log("message");</pre> | ||||
<p>or</p> | <p>or</p> | ||||
<pre>log("message", loglevel);</pre> | <pre>log("message", loglevel);</pre> | ||||
<p>where the <code>loglevel</code> is one of the values</p> | <p>where the <code>loglevel</code> is one of the values</p> | ||||
<ul> | <ul> | ||||
<li><code>org.apache.tools.ant.Project.MSG_ERR</code></li> | |||||
<li><code>org.apache.tools.ant.Project.MSG_WARN</code></li> | |||||
<li><code>org.apache.tools.ant.Project.MSG_INFO</code> (default)</li> | |||||
<li><code>org.apache.tools.ant.Project.MSG_VERBOSE</code></li> | |||||
<li><code>org.apache.tools.ant.Project.MSG_DEBUG</code></li> | |||||
<li><code class="code">org.apache.tools.ant.Project.MSG_ERR</code></li> | |||||
<li><code class="code">org.apache.tools.ant.Project.MSG_WARN</code></li> | |||||
<li><code class="code">org.apache.tools.ant.Project.MSG_INFO</code> (default)</li> | |||||
<li><code class="code">org.apache.tools.ant.Project.MSG_VERBOSE</code></li> | |||||
<li><code class="code">org.apache.tools.ant.Project.MSG_DEBUG</code></li> | |||||
</ul> | </ul> | ||||
</body> | </body> | ||||
@@ -34,10 +34,10 @@ | |||||
any target by using the <code><selector></code> tag and then using it as a reference.</p> | any target by using the <code><selector></code> tag and then using it as a reference.</p> | ||||
<p>Different selectors have different attributes. Some selectors can contain other selectors, | <p>Different selectors have different attributes. Some selectors can contain other selectors, | ||||
and these are called <a href="#selectcontainers"><code>Selector Containers</code></a>. There is | |||||
also a category of selectors that allow user-defined extensions, | |||||
called <a href="#customselect"><code>Custom Selectors</code></a>. The ones built in to Apache | |||||
Ant are called <a href="#coreselect"><code>Core Selectors</code></a>.</p> | |||||
and these are called <a href="#selectcontainers"><q>Selector Containers</q></a>. There is also | |||||
a category of selectors that allow user-defined extensions, | |||||
called <a href="#customselect"><q>Custom Selectors</q></a>. The ones built in to Apache Ant are | |||||
called <a href="#coreselect"><q>Core Selectors</q></a>.</p> | |||||
<h3 id="coreselect">Core Selectors</h3> | <h3 id="coreselect">Core Selectors</h3> | ||||
@@ -877,36 +877,36 @@ | |||||
<h4 id="readable">Readable Selector</h4> | <h4 id="readable">Readable Selector</h4> | ||||
<p>The <code><readable></code> selector selects only files that are readable. Ant only | <p>The <code><readable></code> selector selects only files that are readable. Ant only | ||||
invokes <code>java.io.File#canRead</code> so if a file is unreadable but JVM cannot detect this | |||||
state, this selector will still select the file.</p> | |||||
invokes <code class="code">java.io.File#canRead</code> so if a file is unreadable but JVM cannot | |||||
detect this state, this selector will still select the file.</p> | |||||
<h4 id="writable">Writable Selector</h4> | <h4 id="writable">Writable Selector</h4> | ||||
<p>The <code><writable></code> selector selects only files that are writable. Ant only | <p>The <code><writable></code> selector selects only files that are writable. Ant only | ||||
invokes <code>java.io.File#canWrite</code> so if a file is nonwritable but JVM cannot detect | |||||
this state, this selector will still select the file.</p> | |||||
invokes <code class="code">java.io.File#canWrite</code> so if a file is nonwritable but JVM | |||||
cannot detect this state, this selector will still select the file.</p> | |||||
<h4 id="executable">Executable Selector</h4> | <h4 id="executable">Executable Selector</h4> | ||||
<p>The <code><executable></code> selector selects only files that are executable. Ant | <p>The <code><executable></code> selector selects only files that are executable. Ant | ||||
only invokes <code>java.nio.file.Files#isExecutable</code> so if a file is not executable but | |||||
JVM cannot detect this state, this selector will still select the file.</p> | |||||
only invokes <code class="code">java.nio.file.Files#isExecutable</code> so if a file is not | |||||
executable but JVM cannot detect this state, this selector will still select the file.</p> | |||||
<p><em>Since Ant 1.10.0</em></p> | <p><em>Since Ant 1.10.0</em></p> | ||||
<h4 id="symlink">Symlink Selector</h4> | <h4 id="symlink">Symlink Selector</h4> | ||||
<p>The <code><symlink></code> selector selects only files that are symbolic links. Ant | <p>The <code><symlink></code> selector selects only files that are symbolic links. Ant | ||||
only invokes <code>java.nio.file.Files#isSymbolicLink</code> so if a file is a symbolic link but | |||||
JVM cannot detect this state, this selector will not select the file.</p> | |||||
only invokes <code class="code">java.nio.file.Files#isSymbolicLink</code> so if a file is a | |||||
symbolic link but JVM cannot detect this state, this selector will not select the file.</p> | |||||
<p><em>Since Ant 1.10.0</em></p> | <p><em>Since Ant 1.10.0</em></p> | ||||
<h4 id="ownedBy">OwnedBy Selector</h4> | <h4 id="ownedBy">OwnedBy Selector</h4> | ||||
<p>The <code><ownedBy></code> selector selects only files that are owned by the given | <p>The <code><ownedBy></code> selector selects only files that are owned by the given | ||||
user. Ant only invokes <code>java.nio.file.Files#getOwner</code> so if a file system doesn't | |||||
support the operation this selector will not select the file.</p> | |||||
user. Ant only invokes <code class="code">java.nio.file.Files#getOwner</code> so if a file | |||||
system doesn't support the operation this selector will not select the file.</p> | |||||
<p><em>Since Ant 1.10.0</em></p> | <p><em>Since Ant 1.10.0</em></p> | ||||
@@ -1312,9 +1312,9 @@ | |||||
<p>First, you have to write your selector class in Java. The only requirement it must meet in | <p>First, you have to write your selector class in Java. The only requirement it must meet in | ||||
order to be a selector is that it implements | order to be a selector is that it implements | ||||
the <code>org.apache.tools.ant.types.selectors.FileSelector</code> interface, which contains a | |||||
single method. See <a href="selectors-program.html">Programming Selectors in Ant</a> for more | |||||
information.</p> | |||||
the <code class="code">org.apache.tools.ant.types.selectors.FileSelector</code> interface, which | |||||
contains a single method. See <a href="selectors-program.html">Programming Selectors in Ant</a> | |||||
for more information.</p> | |||||
<p>Once that is written, you include it in your build file by using | <p>Once that is written, you include it in your build file by using | ||||
the <code><custom></code> tag.</p> | the <code><custom></code> tag.</p> | ||||
@@ -1328,7 +1328,7 @@ | |||||
<tr> | <tr> | ||||
<td>classname</td> | <td>classname</td> | ||||
<td>The name of your class that | <td>The name of your class that | ||||
implements <code>org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
implements <code class="code">org.apache.tools.ant.types.selectors.FileSelector</code>. | |||||
</td> | </td> | ||||
<td>Yes</td> | <td>Yes</td> | ||||
</tr> | </tr> | ||||
@@ -1362,15 +1362,15 @@ | |||||
<ul> | <ul> | ||||
<li><a href="#containsselect">Contains Selector</a> with | <li><a href="#containsselect">Contains Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.ContainsSelector</code> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.ContainsSelector</code> | |||||
<li><a href="#dateselect">Date Selector</a> with | <li><a href="#dateselect">Date Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.DateSelector</code> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.DateSelector</code> | |||||
<li><a href="#depthselect">Depth Selector</a> with | <li><a href="#depthselect">Depth Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.DepthSelector</code> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.DepthSelector</code> | |||||
<li><a href="#filenameselect">Filename Selector</a> with | <li><a href="#filenameselect">Filename Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.FilenameSelector</code> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.FilenameSelector</code> | |||||
<li><a href="#sizeselect">Size Selector</a> with | <li><a href="#sizeselect">Size Selector</a> with | ||||
classname <code>org.apache.tools.ant.types.selectors.SizeSelector</code> | |||||
classname <code class="code">org.apache.tools.ant.types.selectors.SizeSelector</code> | |||||
</ul> | </ul> | ||||
<p>Here is the example from the Depth Selector section rewritten to use the selector | <p>Here is the example from the Depth Selector section rewritten to use the selector | ||||
@@ -38,8 +38,9 @@ Dependencies</a> for more information.</p> | |||||
<p>This data type provides a catalog of resource locations based on | <p>This data type provides a catalog of resource locations based on | ||||
the <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html" | the <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html" | ||||
target="_top">OASIS XML Catalog standard</a>. The catalog entries are used both for Entity | target="_top">OASIS XML Catalog standard</a>. The catalog entries are used both for Entity | ||||
resolution and URI resolution, in accordance with the <code>org.xml.sax.EntityResolver</code> | |||||
and <code>javax.xml.transform.URIResolver</code> interfaces as defined in | |||||
resolution and URI resolution, in accordance with | |||||
the <code class="code">org.xml.sax.EntityResolver</code> | |||||
and <code class="code">javax.xml.transform.URIResolver</code> interfaces as defined in | |||||
the <a href="https://download.oracle.com/otn-pub/jcp/jaxp-1_6-mrel3-spec/JAXP1_6-FinalSpec.pdf" | the <a href="https://download.oracle.com/otn-pub/jcp/jaxp-1_6-mrel3-spec/JAXP1_6-FinalSpec.pdf" | ||||
target="_top">Java API for XML Processing (JAXP) Specification</a>.</p> | target="_top">Java API for XML Processing (JAXP) Specification</a>.</p> | ||||
<p>For example, in a <code>web.xml</code> file, the DTD is referenced as:</p> | <p>For example, in a <code>web.xml</code> file, the DTD is referenced as:</p> | ||||
@@ -193,21 +194,18 @@ warning will be logged.</p> | |||||
<p>Set up an XMLCatalog with a single DTD referenced locally in a user's home directory:</p> | <p>Set up an XMLCatalog with a single DTD referenced locally in a user's home directory:</p> | ||||
<pre> | <pre> | ||||
<xmlcatalog> | <xmlcatalog> | ||||
<dtd | |||||
publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" | |||||
location="/home/dion/downloads/docbook/docbookx.dtd"/> | |||||
<dtd publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" | |||||
location="/home/dion/downloads/docbook/docbookx.dtd"/> | |||||
</xmlcatalog></pre> | </xmlcatalog></pre> | ||||
<p>Set up an XMLCatalog with a multiple DTDs to be found either in the filesystem (relative to | <p>Set up an XMLCatalog with a multiple DTDs to be found either in the filesystem (relative to | ||||
the Ant project <var>basedir</var>) or in the classpath: | the Ant project <var>basedir</var>) or in the classpath: | ||||
</p> | </p> | ||||
<pre> | <pre> | ||||
<xmlcatalog id="commonDTDs"> | <xmlcatalog id="commonDTDs"> | ||||
<dtd | |||||
publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" | |||||
location="docbook/docbookx.dtd"/> | |||||
<dtd | |||||
publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" | |||||
location="web-app_2_2.dtd"/> | |||||
<dtd publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" | |||||
location="docbook/docbookx.dtd"/> | |||||
<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" | |||||
location="web-app_2_2.dtd"/> | |||||
</xmlcatalog></pre> | </xmlcatalog></pre> | ||||
<p>Set up an XMLCatalog with a combination of DTDs and entities as well as a nested XMLCatalog | <p>Set up an XMLCatalog with a combination of DTDs and entities as well as a nested XMLCatalog | ||||
@@ -215,21 +213,17 @@ and external catalog files in both formats:</p> | |||||
<pre> | <pre> | ||||
<xmlcatalog id="allcatalogs"> | <xmlcatalog id="allcatalogs"> | ||||
<dtd | |||||
publicId="-//ArielPartners//DTD XML Article V1.0//EN" | |||||
location="com/arielpartners/knowledgebase/dtd/article.dtd"/> | |||||
<entity | |||||
publicId="LargeLogo" | |||||
location="com/arielpartners/images/ariel-logo-large.gif"/> | |||||
<dtd publicId="-//ArielPartners//DTD XML Article V1.0//EN" | |||||
location="com/arielpartners/knowledgebase/dtd/article.dtd"/> | |||||
<entity publicId="LargeLogo" | |||||
location="com/arielpartners/images/ariel-logo-large.gif"/> | |||||
<xmlcatalog refid="commonDTDs"/> | <xmlcatalog refid="commonDTDs"/> | ||||
<catalogpath> | <catalogpath> | ||||
<pathelement location="/etc/sgml/catalog"/> | <pathelement location="/etc/sgml/catalog"/> | ||||
<fileset | |||||
dir="/anetwork/drive" | |||||
includes="**/catalog"/> | |||||
<fileset | |||||
dir="/my/catalogs" | |||||
includes="**/catalog.xml"/> | |||||
<fileset dir="/anetwork/drive" | |||||
includes="**/catalog"/> | |||||
<fileset dir="/my/catalogs" | |||||
includes="**/catalog.xml"/> | |||||
</catalogpath> | </catalogpath> | ||||
</xmlcatalog> | </xmlcatalog> | ||||
</xmlcatalog></pre> | </xmlcatalog></pre> | ||||