<pre>The borland element will generate into the lib dir an ejb jar file using the deployment descriptor placed into the ${rsc.dir}/hrmanager directory.
The verify phase is turned on and the generate client phase as well.
</pre>
<p>The following <samp>build.xml</samp> snippet is an example of how to use Borland element in
<p>sets the <code>jaxp11.present</code> property to the value "true"
if the class <code>javax.xml.transform.Transformer</code> is found in the classpath referenced by <code>jaxp</code> (in this case, <code>./lib/jaxp11/jaxp.jar</code>).
Technical University Graz</a> offer more digest algorithms than those
built-in into your JDK.</p>
<p>
Warning: the case of the extension is that of the algorithm used.
If you ask for "SHA1", you get a .SHA1 extension; if you ask for "sha1", you
get a file ending in .sha1. The Java Crypto Engines are case-insensitive
in matching algorithms, so choose a name to match your desired output extension,
or set the <tt>fileext</tt> attribute. The names of common hashing algorithms can be located on the
<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#MessageDigest">Cryptography Architecture Standard Algorithm Name Documentation</a>
</p>
<p>Generates checksum for files. This task can also be used to perform checksum verifications.</p>
<p>Note that many popular message digest functions—including MD5 and SHA-1—have been
broken recently. If you are going to use the task to create checksums used in an environment where
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/">The Legion of the Bouncy Castle</a>,
the <a href="https://www.gnu.org/software/gnu-crypto/">GNU project</a>
or <a href="https://jce.iaik.tugraz.at/sic/Products">the Technical University Graz</a> offer more
digest algorithms than those built-in into your JDK.</p>
<p>Warning: the case of the extension is that of the algorithm used. If you ask
for <samp>SHA1</samp>, you get a <samp>.SHA1</samp> extension; if you ask for <samp>sha1</samp>, you
get a file ending in <samp>.sha1</samp>. The Java Crypto Engines are case-insensitive in matching
algorithms, so choose a name to match your desired output extension, or set the <var>fileext</var>
attribute. The names of common hashing algorithms can be located on the <a target="_blank"
<td valign="top">The file to generate checksum for.</td>
<td valign="top" align="center">Yes, unless
at least one nested (filesystem-only) resource collection is specified.</td>
<td>file</td>
<td>The file to generate checksum for.</td>
<td>Yes, unless at least one nested (filesystem-only) resource collection is specified.</td>
</tr>
<tr>
<td valign="top">todir</td>
<td valign="top">The root directory where checksums should be written.</td>
<td valign="top" align="center">No. If not specified, checksum files
will be written to the same directory as the files themselves.
<em>since Apache Ant 1.6</em>
<td>todir</td>
<td>The root directory where checksums should be written.</td>
<td>No. If not specified, checksum files will be written to the same directory as the files
themselves. <em>since Apache Ant 1.6</em>
</td>
</tr>
<tr>
<td valign="top">algorithm</td>
<td valign="top">Specifies the algorithm to be used to
compute the checksum. Defaults to "MD5".
Other <a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#MessageDigest">popular algorithms</a> like "SHA" or "SHA-512" may be used
as well.
<td>algorithm</td>
<td>Specifies the algorithm to be used to compute the checksum. Please check the
<p>silently (<code>-q</code>) creates a file called <code>patch.txt</code> which contains a unified (<code>-u</code>) diff which includes new files added via "cvs add" (<code>-N</code>) and can be used as input to patch.
The equivalent, using <code><commandline></code> elements, is:
<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>
elements, is:</p>
<pre>
<cvs output="patch">
<commandline>
@@ -199,29 +194,27 @@ The equivalent, using <code><commandline></code> elements, is:
<argument value="-u"/>
<argument value="-N"/>
</commandline>
</cvs>
</pre>
or:
</cvs></pre>
<p>or:</p>
<pre>
<cvs output="patch">
<commandline>
<argument line="-q diff -u -N"/>
</commandline>
</cvs>
</pre>
<p>
You may include as many <code><commandline></code> elements as you like.
Each will inherit the <code>failonerror</code>, <code>compression</code>, and other "global" parameters
from the <code><cvs></code> element.
</p>
</cvs></pre>
<p>You may include as many <code><commandline></code> elements as you like. Each will inherit
the <var>failonerror</var>, <var>compression</var>, and other "global" parameters from
the <code><cvs></code> element.</p>
<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 cvs "as-is" so any cvs options should appear
before the command, and any command options should appear after the command as in the diff example
above. See <a href="http://ximbiot.com/cvs/wiki/index.php?title=Category:User_Documentation" target="_top">the cvs manual</a> for details,
specifically the <a href="http://ximbiot.com/cvs/wiki/index.php?title=CVS--Concurrent_Versions_System_v1.12.12.1:_Guide_to_CVS_commands#SEC116" target="_top">Guide to CVS commands</a></p>
<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
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
book</a> for details, specifically
the <a href="http://cvsbook.red-bean.com/cvsbook.html#Commands%20And%20Options" target="_top">Guide
<td valign="top"><code>true</code>, <code>false</code>, or the number 1-9 (corresponding to possible values for CVS <code>-z#</code> argument). Any other value is treated as false</td>
<td align="center" valign="top">No. Defaults to no compression. if passed <code>true</code>, level 3 compression is assumed.</td>
<td>compression</td>
<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
value is treated as <q>false</q></td>
<td>No; defaults to no compression</td>
</tr>
<tr>
<td valign="top">cvsRoot</td>
<td valign="top">the CVSROOT variable.</td>
<td align="center" valign="top">No</td>
<td>cvsRoot</td>
<td>the <code>CVSROOT</code> variable.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">cvsRsh</td>
<td valign="top">the CVS_RSH variable.</td>
<td align="center" valign="top">No</td>
<td>cvsRsh</td>
<td>the <code>CVS_RSH</code> variable.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">package</td>
<td valign="top">the package/module to analyze.<br>
<em>Since Ant 1.6</em>
multiple packages separated by spaces are possible.
aliases corresponding to different modules are also possible.
Use a nested <module> element if you want to specify a module with
spaces in its name.</td>
<td align="center" valign="top">No</td>
<td>package</td>
<td>the package/module to analyze.<br/><em>Since Ant 1.6</em> multiple packages separated by
spaces are possible. aliases corresponding to different modules are also possible. Use a
nested <code><module></code> element if you want to specify a module with spaces in its
<p>An extension of the <a href="jar.html">Jar</a> task with special
treatment for files that should end up in an Enterprise Application archive.</p>
<p>(The Ear task is a shortcut for specifying the particular layout of a EAR file.
The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i>
attributes of zipfilesets in a Zip or Jar task.)</p>
<p>The extended zipfileset element from the zip task (with attributes <i>prefix</i>, <i>fullpath</i>, and <i>src</i>) is available in the Ear task.</p>
<p>An extension of the <a href="jar.html">Jar</a> task with special treatment for files that should
end up in an Enterprise Application archive.</p>
<p>(The <code>Ear</code> task is a shortcut for specifying the particular layout of a EAR file. The
same thing can be accomplished by using the <var>prefix</var> and <var>fullpath</var> attributes of
zipfilesets in a <code>Zip</code> or <code>Jar</code> task.)</p>
<p>The extended zipfileset element from the <code>Zip</code> task (with
attributes <var>prefix</var>, <var>fullpath</var>, and <var>src</var>) is available in
the <code>Ear</code> task.</p>
<p><b>Please note that the zip format allows multiple files of the same
fully-qualified name to exist within a single archive. This has been
documented as causing various problems for unsuspecting users. If you wish
to avoid this behavior you must set the <code>duplicate</code> attribute
to a value other than its default, <code>"add"</code>.</b></p>
<p><strong>Please note that the zip format allows multiple files of the same fully-qualified name to
exist within a single archive. This has been documented as causing various problems for
unsuspecting users. If you wish to avoid this behavior you must set the <var>duplicate</var>
attribute to a value other than its default, <q>add</q>.</strong></p>
<td valign="top">The deployment descriptor to use (META-INF/application.xml).</td>
<td valign="top" align="center">Yes, unless update is set to true</td>
<td>appxml</td>
<td>The deployment descriptor to use (<samp>META-INF/application.xml</samp>).</td>
<td>Yes, unless <var>update</var> is set to <q>true</q></td>
</tr>
<tr>
<td valign="top">basedir</td>
<td valign="top">the directory from which to jar the files.</td>
<td valign="top" align="center">No</td>
<td>basedir</td>
<td>the directory from which to jar the files.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">compress</td>
<td valign="top">Not only store data but also compress them,
defaults to true. Unless you set the <em>keepcompression</em>
attribute to false, this will apply to the entire archive, not
only the files you've added while updating.</td>
<td align="center" valign="top">No</td>
<td>compress</td>
<td>Not only store data but also compress them. Unless you set the <var>keepcompression</var>
attribute to <q>false</q>, this will apply to the entire archive, not only the files you've
added while updating.</td>
<td>No; defaults to <q>true</q></td>
</tr>
<tr>
<td valign="top">keepcompression</td>
<td valign="top">For entries coming from existing archives (like
nested <em>zipfileset</em>s or while updating the archive), keep
the compression as it has been originally instead of using the
<em>compress</em> attribute. Defaults to false. <em>Since Apache Ant
1.6</em></td>
<td align="center" valign="top">No</td>
<td>keepcompression</td>
<td>For entries coming from existing archives (like nested <code>zipfileset</code>s or while
updating the archive), keep the compression as it has been originally instead of using the
<var>compress</var> attribute. <em>Since Apache Ant 1.6</em></td>
<td>No; defaults to <q>false</q></td>
</tr>
<tr>
<td valign="top">encoding</td>
<td valign="top">The character encoding to use for filenames
inside the archive. Defaults to UTF8. <strong>It is not
recommended to change this value as the created archive will most
likely be unreadable for Java otherwise.</strong>
<br/>See also the <a href="zip.html#encoding">discussion in the
zip task page</a></td>
<td align="center" valign="top">No</td>
<td>encoding</td>
<td>The character encoding to use for filenames inside the archive. <strong>It is not
recommended to change this value as the created archive will most likely be unreadable for
Java otherwise.</strong> <br/>See also the <a href="zip.html#encoding">discussion in the zip
task page</a></td>
<td>No; defaults to <q>UTF8</q></td>
</tr>
<tr>
<td valign="top">filesonly</td>
<td valign="top">Store only file entries, defaults to false</td>
<td align="center" valign="top">No</td>
<td>filesonly</td>
<td>Store only file entries.</td>
<td>No; defaults to <q>false</q></td>
</tr>
<tr>
<td valign="top">includes</td>
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td>
<td valign="top" align="center">No</td>
<td>includes</td>
<td>comma- or space-separated list of patterns of files that must be included.</td>
<td>No; defaults to all (<q>**</q>)</td>
</tr>
<tr>
<td valign="top">includesfile</td>
<td valign="top">the name of a file. Each line of this file is
taken to be an include pattern</td>
<td valign="top" align="center">No</td>
<td>includesfile</td>
<td>name of a file. Each line of this file is taken to be an include pattern.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">excludes</td>
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td>
<td>excludes</td>
<td>comma- or space-separated list of patterns of files that must be excluded.</td>
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
</tr>
<tr>
<td valign="top">excludesfile</td>
<td valign="top">the name of a file. Each line of this file is
taken to be an exclude pattern</td>
<td valign="top" align="center">No</td>
<td>excludesfile</td>
<td>name of a file. Each line of this file is taken to be an exclude pattern.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">defaultexcludes</td>
<td valign="top">indicates whether default excludes should be used or not
("yes"/"no"). Default excludes are used when omitted.</td>
<td valign="top" align="center">No</td>
<td>defaultexcludes</td>
<td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
<td>No; defaults to <q>yes</q></td>
</tr>
<tr>
<td valign="top">manifest</td>
<td valign="top">the manifest file to use.</td>
<td valign="top" align="center">No</td>
<td>manifest</td>
<td>the manifest file to use.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">filesetmanifest</td>
<td valign="top">behavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are "skip", "merge", and "mergewithoutmain". "merge" will merge all of the manifests together, and merge this into any other specified manifests. "mergewithoutmain" merges everything but the Main section of the manifests. Default value is "skip".
</td>
<td valign="top" align="center">No</td>
<td>filesetmanifest</td>
<td>behavior when a manifest file is found in a <code>zipfileset</code>
or <code>zipgroupfileset</code> file. Valid values are <q>skip</q>, <q>merge</q>,
and <q>mergewithoutmain</q>. <q>merge</q> will merge all of the manifests together, and merge
this into any other specified manifests. <q>mergewithoutmain</q> merges everything but the Main
section of the manifests.</td>
<td>No; defaults to <q>skip</q></td>
</tr>
<tr>
<td valign="top">whenmanifestonly</td>
<td valign="top">behavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".</td>
<td valign="top" align="center">No</td>
<td>whenmanifestonly</td>
<td>behavior when no files match. Valid values are <q>fail</q>, <q>skip</q>,
and <q>create</q>.</td>
<td>No; defaults to <q>create</q></td>
</tr>
<tr>
<td valign="top">manifestencoding</td>
<td valign="top">The encoding used to read the JAR manifest, when a manifest file is specified.</td>
<td valign="top" align="center">No, defaults to the platform encoding.</td>
<td>manifestencoding</td>
<td>The encoding used to read the JAR manifest, when a manifest file is specified.</td>
<td>No; defaults to default JVM character encoding</td>
5</a>. In order to avoid problems with Ant generated jars on
Java 1.4 or earlier Ant will not include META-INF unless
explicitly asked to. Defaults to false<br/>
<em>Since Ant 1.8.0</em>.</td>
<td valign="top" align="center">No</td>
<td>indexMetaInf</td>
<td>whether to include <samp>META-INF</samp> and its children in the index. Doesn't have any
effect if <var>index</var> is false.<br/>Oracle's jar implementation used to skip
the <samp>META-INF</samp> directory and Ant followed that example. The behavior has been
changed with <a href="https://bugs.openjdk.java.net/browse/JDK-4408526">Java 5</a>. In order
to avoid problems with Ant generated jars on Java 1.4 or earlier, Ant will not
include <samp>META-INF</samp> unless explicitly asked to.<br/><em>Since Ant 1.8.0</em>.</td>
<td>No; defaults to <q>false</q></td>
</tr>
<tr>
<td valign="top">update</td>
<td valign="top">indicates whether to update or overwrite
the destination file if it already exists. Default is "false".</td>
<td valign="top" align="center">No</td>
<td>update</td>
<td>indicates whether to update or overwrite the destination file if it already exists.</td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">duplicate</td>
<td valign="top">behavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". </td>
<td valign="top" align="center">No</td>
<td>duplicate</td>
<td>behavior when a duplicate file is found. Valid values are <q>add</q>, <q>preserve</q>,
and <q>fail</q>.</td>
<td>No; default is <q>add</q></td>
</tr>
<tr>
<td valign="top">roundup</td>
<td valign="top">Whether the file modification times will be
rounded up to the next even number of seconds.<br>
Zip archives store file modification times with a granularity of
two seconds, so the times will either be rounded up or down. If
you round down, the archive will always seem out-of-date when you
rerun the task, so the default is to round up. Rounding up may
lead to a different type of problems like JSPs inside a web
archive that seem to be slightly more recent than precompiled
pages, rendering precompilation useless.<br>
Defaults to true. <em>Since Ant 1.6.2</em></td>
<td align="center" valign="top">No</td>
<td>roundup</td>
<td>Whether the file modification times will be rounded up to the next even number of
seconds.<br/>Zip archives store file modification times with a granularity of 2 seconds, so
the times will either be rounded up or down. If you round down, the archive will always seem
out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a
different type of problems like JSPs inside a web archive that seem to be slightly more recent
than precompiled pages, rendering precompilation useless.<br/><em>Since Ant 1.6.2</em></td>
<td>No; defaults to <q>true</q></td>
</tr>
<tr>
<td valign="top">level</td>
<td valign="top">Non-default level at which file compression should be
performed. Valid values range from 0 (no compression/fastest) to 9
(maximum compression/slowest). <em>Since Ant 1.7</em></td>
<td valign="top" align="center">No</td>
<td>level</td>
<td>Non-default level at which file compression should be performed. Valid values range
from <q>0</q> (no compression/fastest) to <q>9</q> (maximum compression/slowest). <em>Since Ant
1.7</em></td>
<td>No</td>
</tr>
<tr>
<td valign="top">preserve0permissions</td>
<td valign="top">when updating an archive or adding entries from a
different archive Ant will assume that a Unix permissions value of
0 (nobody is allowed to do anything to the file/directory) means
that the permissions haven't been stored at all rather than real
permissions and will instead apply its own default values.<br/>
Set this attribute to true if you really want to preserve the
original permission field. <em>Since Ant 1.8.0</em>
<td>preserve0permissions</td>
<td>when updating an archive or adding entries from a different archive Ant will assume that a
Unix permissions value of 0 (nobody is allowed to do anything to the file/directory) means
that the permissions haven't been stored at all rather than real permissions and will instead
apply its own default values.<br/> Set this attribute to <q>true</q> if you really want to
preserve the original permission field. <em>Since Ant 1.8.0</em>
</td>
<td valign="top" align="center">No, default is false</td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">useLanguageEncodingFlag</td>
<td valign="top">Whether to set the language encoding flag if the
encoding is UTF-8. This setting doesn't have any effect if the
encoding is not UTF-8.
<em>Since Ant 1.8.0</em>.
<br/>See also the <a href="zip.html#encoding">discussion in the
zip task page</a></td>
<td valign="top" align="center">No, default is true</td>
<td>useLanguageEncodingFlag</td>
<td>Whether to set the language encoding flag if the encoding is UTF-8. This setting doesn't
have any effect if the encoding is not UTF-8. <em>Since Ant 1.8.0</em>.<br/>See also
the <a href="zip.html#encoding">discussion in the zip task page</a></td>
<td>No; default is <q>true</q></td>
</tr>
<tr>
<td valign="top">createUnicodeExtraFields</td>
<td valign="top">Whether to create unicode extra fields to store
the file names a second time inside the entry's metadata.
<br>Possible values are "never", "always" and "not-encodeable"
which will only add Unicode extra fields if the file name cannot
be encoded using the specified encoding.
<em>Since Ant 1.8.0</em>.
<br/>See also the <a href="zip.html#encoding">discussion in the
zip task page</a></td>
<td align="center" valign="top">No, default is "never"</td>
<td>createUnicodeExtraFields</td>
<td>Whether to create Unicode extra fields to store the file names a second time inside the
entry's metadata.<br/>Possible values are <q>never</q>, <q>always</q>
and <q>not-encodeable</q> which will only add Unicode extra fields if the file name cannot be
encoded using the specified encoding. <em>Since Ant 1.8.0</em>. <br/>See also
the <a href="zip.html#encoding">discussion in the zip task page</a></td>
<td>No; default is <q>never</q></td>
</tr>
<tr>
<td valign="top">fallbacktoUTF8</td>
<td valign="top">Whether to use UTF-8 and the language encoding
flag instead of the specified encoding if a file name cannot be
encoded using the specified encoding.
<em>Since Ant 1.8.0</em>.
<br/>See also the <a href="zip.html#encoding">discussion in the
zip task page</a></td>
<td align="center" valign="top">No, default is false</td>
<td>fallbacktoUTF8</td>
<td>Whether to use UTF-8 and the language encoding flag instead of the specified encoding if a
file name cannot be encoded using the specified encoding. <em>Since Ant 1.8.0</em>.<br/>See
also the <a href="zip.html#encoding">discussion in the zip task page</a></td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">mergeClassPathAttributes</td>
<td valign="top">Whether to merge the Class-Path attributes found
in different manifests (if merging manifests). If false, only
the attribute of the last merged manifest will be preserved.
<em>Since Ant 1.8.0</em>.
<br/>unless you also set flattenAttributes to true this may
result in manifests containing multiple Class-Path attributes
which violates the manifest specification.</td>
<td align="center" valign="top">No, default is false</td>
<td>mergeClassPathAttributes</td>
<td>Whether to merge the <code>Class-Path</code> attributes found in different manifests (if
merging manifests). If <q>false</q>, only the attribute of the last merged manifest will be
preserved. <em>Since Ant 1.8.0</em>.<br/>unless you also set <var>flattenAttributes</var>
to <q>true</q> this may result in manifests containing multiple <code>Class-Path</code>
attributes which violates the manifest specification.</td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">flattenAttributes</td>
<td valign="top">Whether to merge attributes occurring more than
once in a section (this can only happen for the Class-Path
attribute) into a single attribute.
<em>Since Ant 1.8.0</em>.</td>
<td align="center" valign="top">No, default is false</td>
<td>flattenAttributes</td>
<td>Whether to merge attributes occurring more than once in a section (this can only happen for
the <code>Class-Path</code> attribute) into a single attribute. <em>Since Ant
1.8.0</em>.</td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">zip64Mode</td>
<td valign="top">When to use Zip64 extensions for entries. The
possible values are "never", "always" and "as-needed".
<em>Since Ant 1.9.1</em>.
<br/>See also the <a href="zip.html#zip64">discussion in the
zip task page</a></td>
<td align="center" valign="top">No, default is "never"</td>
<td>zip64Mode</td>
<td>When to use Zip64 extensions for entries. The possible values
are <q>never</q>, <q>always</q> and <q>as-needed</q>. <em>Since Ant 1.9.1</em>.<br/>See also
the <a href="zip.html#zip64">discussion in the zip task page</a></td>
<td>No; default is <q>never</q></td>
</tr>
</table>
<h3>Nested elements</h3>
<h4>metainf</h4>
<p>The nested <code>metainf</code> element specifies a <a
href="../Types/fileset.html">FileSet</a>. All files included in this fileset will
end up in the <code>META-INF</code> directory of the ear file. If this
fileset includes a file named <code>MANIFEST.MF</code>, the file is
ignored and you will get a warning.</p>
<p>The nested <code>metainf</code> element specifies
a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will end up in
the <samp>META-INF</samp> directory of the ear file. If this fileset includes a file
named <samp>MANIFEST.MF</samp>, the file is ignored and you will get a warning.</p>
<h4>manifest, indexjars, service</h4>
These are inherited from <a href="jar.html"><jar></a>
<p>These are inherited from <a href="jar.html"><jar></a></p>
<code>::CreateProcess</code></a>. It is the latter Win32 function that defines
the exact semantics of the call. In particular, if you do not put a file extension
on the executable, only ".EXE" files are looked for, not ".COM", ".CMD" or other file
types listed in the environment variable PATHEXT. That is only used by the shell.
</p>
<p>
Note that <em>.bat</em> 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>
apparently
calls <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx"> <code>::CreateProcess</code></a>. It
is the latter Win32 function that defines the exact semantics of the call. In particular, if you do
not put a file extension on the executable, 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>
<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>
<pre>
<target name="help">
<exec executable="cmd">
@@ -67,245 +60,207 @@ types listed in the environment variable PATHEXT. That is only used by the shell
<arg value="ant.bat"/>
<arg value="-p"/>
</exec>
</target>
</pre>
</target></pre>
<p>A common problem is not having the executable on the PATH. In case you get an error
message <tt>Cannot run program "...":CreateProcess error=2. The system cannot find
the path specified.</tt> have a look at your PATH 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 PATH (<tt>set PATH=%PATH%;dirOfProgram</tt>) or specify the absolute path in the
<tt>executable</tt> attribute in your buildfile.
</p>
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>
<h4>Cygwin Users</h4>
<p>The <code><exec></code> task will not understand paths such as /bin/sh
for the executable parameter. This is because the Java VM in which Ant is
running is a standard Windows executable and is not aware of the Cygwin
environment (i.e., doesn't load <code>cygwin1.dll</code>). The only
work-around for this is to compile a JVM under Cygwin (at your own risk).
<td valign="top">the directory from which to jar the files.</td>
<td valign="top" align="center">No</td>
<td>basedir</td>
<td>the directory from which to jar the files.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">compress</td>
<td valign="top">Not only store data but also compress them,
defaults to true. Unless you set the <em>keepcompression</em>
attribute to false, this will apply to the entire archive, not
only the files you've added while updating.</td>
<td align="center" valign="top">No</td>
<td>compress</td>
<td>Not only store data but also compress them. Unless you set the <var>keepcompression</var>
attribute to <q>false</q>, this will apply to the entire archive, not only the files you've
added while updating.</td>
<td>No; defaults to <q>true</q></td>
</tr>
<tr>
<td valign="top">keepcompression</td>
<td valign="top">For entries coming from existing archives (like
nested <em>zipfileset</em>s or while updating the archive), keep
the compression as it has been originally instead of using the
<em>compress</em> attribute. Defaults to false. <em>Since Ant
1.6</em></td>
<td align="center" valign="top">No</td>
<td>keepcompression</td>
<td>For entries coming from existing archives (like nested <code>zipfileset</code>s or while
updating the archive), keep the compression as it has been originally instead of using the
<var>compress</var> attribute. <em>Since Ant 1.6</em></td>
<td>No; defaults to <q>false</q></td>
</tr>
<tr>
<td valign="top">encoding</td>
<td valign="top">The character encoding to use for filenames
inside the archive. Defaults to UTF8. <strong>It is not
recommended to change this value as the created archive will
most likely be unreadable for Java otherwise.</strong>
<br/>See also the <a href="zip.html#encoding">discussion in the
zip task page</a></td>
<td align="center" valign="top">No</td>
<td>encoding</td>
<td>The character encoding to use for filenames inside the archive. <strong>It is not
recommended to change this value as the created archive will most likely be unreadable for
Java otherwise.</strong> <br/>See also the <a href="zip.html#encoding">discussion in the zip
task page</a></td>
<td>No; defaults to <q>UTF8</q></td>
</tr>
<tr>
<td valign="top">filesonly</td>
<td valign="top">Store only file entries, defaults to false</td>
<td align="center" valign="top">No</td>
<td>filesonly</td>
<td>Store only file entries</td>
<td>No; defaults to <q>false</q></td>
</tr>
<tr>
<td valign="top">includes</td>
<td valign="top">comma- or space-separated list of patterns of files that must be
included. All files are included when omitted.</td>
<td valign="top" align="center">No</td>
<td>includes</td>
<td>comma- or space-separated list of patterns of files that must be included</td>
<td>No; defaults to all (<q>**</q>)</td>
</tr>
<tr>
<td valign="top">includesfile</td>
<td valign="top">the name of a file. Each line of this file is
taken to be an include pattern</td>
<td valign="top" align="center">No</td>
<td>includesfile</td>
<td>name of a file. Each line of this file is taken to be an include pattern</td>
<td>No</td>
</tr>
<tr>
<td valign="top">excludes</td>
<td valign="top">comma- or space-separated list of patterns of files that must be
excluded. No files (except default excludes) are excluded when omitted.</td>
<td valign="top" align="center">No</td>
<td>excludes</td>
<td>comma- or space-separated list of patterns of files that must be excluded</td>
<td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
</tr>
<tr>
<td valign="top">excludesfile</td>
<td valign="top">the name of a file. Each line of this file is
taken to be an exclude pattern</td>
<td valign="top" align="center">No</td>
<td>excludesfile</td>
<td>Name of a file. Each line of this file is taken to be an exclude pattern</td>
<td>No</td>
</tr>
<tr>
<td valign="top">defaultexcludes</td>
<td valign="top">indicates whether default excludes should be used or not
("yes"/"no"). Default excludes are used when omitted.</td>
<td valign="top" align="center">No</td>
<td>defaultexcludes</td>
<td>indicates whether default excludes should be used or not (<q>yes|no</q>)</td>
<td>No; defaults to <q>yes</q></td>
</tr>
<tr>
<td valign="top">manifest</td>
<td valign="top">the manifest file to use. This can be either the location of a manifest, or the name of a jar added through a fileset. If its the name of an added jar, the task expects the manifest to be in the jar at META-INF/MANIFEST.MF</td>
<td valign="top" align="center">No</td>
<td>manifest</td>
<td>the manifest file to use. This can be either the location of a manifest, or the name of a
jar added through a fileset. If its the name of an added jar, the task expects the manifest
to be in the jar at <samp>META-INF/MANIFEST.MF</samp></td>
<td>No</td>
</tr>
<tr>
<td valign="top">filesetmanifest</td>
<td valign="top">behavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are "skip", "merge", and "mergewithoutmain". "merge" will merge all of the manifests together, and merge this into any other specified manifests. "mergewithoutmain" merges everything but the Main section of the manifests. Default value is "skip".
<td>filesetmanifest</td>
<td>behavior when a manifest is found in a <code>zipfileset</code>
or <code>zipgroupfileset</code> file. Valid values are <q>skip</q>, <q>merge</q>,
and <q>mergewithoutmain</q>. <q>merge</q> will merge all of the manifests together, and merge
this into any other specified manifests. <q>mergewithoutmain</q> merges everything but the
Main section of the manifests.
</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">update</td>
<td valign="top">indicates whether to update or overwrite
the destination file if it already exists. Default is "false".</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">whenmanifestonly</td>
<td valign="top">behavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">duplicate</td>
<td valign="top">behavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". </td>
<!-- If this is an Applet or Web Start application, include
the proper attributes from <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/index.html">http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/index.html</a> -->
<!-- If this is an Applet or Web Start application, include
the proper attributes from <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html">https://docs.oracle.com/javase/8/docs/technotes/guides/jweb/index.html</a> -->
<td align="center" valign="top">Either <tt>jar</tt>, <tt>classname</tt> or <tt>module</tt></td>
<td>classname</td>
<td>the Java class to execute.</td>
<td rowspan="3">Exactly one of the three</td>
</tr>
<tr>
<td valign="top">jar</td>
<td valign="top">the location of the jar file to execute (must have a
Main-Class entry in the manifest). Fork must be set to true if this option is selected.
See notes below for more details.
<td>jar</td>
<td class="left">the location of the jar file to execute (must have a <code>Main-Class</code>
entry in the manifest). <var>fork</var> must be set to <q>true</q> if this option is selected.
See notes below for more details.
</td>
<td align="center" valign="top">Either <tt>jar</tt>, <tt>classname</tt> or <tt>module</tt></td>
</tr>
<tr>
<td valign="top">args</td>
<td valign="top">the arguments for the class that is
executed. <b>deprecated, use nested <code><arg></code>
elements instead.</b></td>
<td align="center" valign="top">No</td>
<td>module</td>
<td class="left">The initial or main module to resolve (must have a <code>Main-Class</code>
entry in the manifest). <var>fork</var> must be set to <q>true</q> if this option is
selected. <em>since Ant 1.9.7</em></td>
</tr>
<tr>
<td valign="top">classpath</td>
<td valign="top">the classpath to use.</td>
<td align="center" valign="top">No</td>
<td>args</td>
<td>the arguments for the class that is executed. <em><u>Deprecated</u>, use
nested <code><arg></code> elements instead.</em></td>
<td>No</td>
</tr>
<tr>
<td valign="top">classpathref</td>
<td valign="top">the classpath to use, given as <a
href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
<td align="center" valign="top">No</td>
<td>classpath</td>
<td>the classpath to use.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">fork</td>
<td valign="top">if enabled triggers the class execution in another VM
(disabled by default)</td>
<td align="center" valign="top">No</td>
<td>classpathref</td>
<td>the classpath to use, given as <a href="../using.html#references">reference</a> to
a <code>Path</code> defined elsewhere.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">spawn</td>
<td valign="top">if enabled allows to start a process which will outlive Ant.<br>
Requires fork=true, and not compatible
with timeout, input, output, error, result attributes.<br>
(disabled by default)</td>
<td align="center" valign="top">No</td>
<td>modulepath</td>
<td>Specify where to find application modules. A list of directories of modules, module files or
exploded modules. <em>since Ant 1.9.7</em></td>
<td>No</td>
</tr>
<tr>
<td valign="top">jvm</td>
<td valign="top">the command used to invoke the Java Virtual Machine,
default is 'java'. The command is resolved by java.lang.Runtime.exec().
Ignored if fork is disabled.
</td>
<td align="center" valign="top">No</td>
<td>modulepathref</td>
<td>The modulepath to use, given as <a href="../using.html#references">reference</a> to
a <code>Path</code> defined elsewhere. <em>since Ant 1.9.7</em></td>
<td>No</td>
</tr>
<tr>
<td valign="top">jvmargs</td>
<td valign="top">the arguments to pass to the forked VM (ignored
if fork is disabled). <b>deprecated, use nested
<code><jvmarg></code> elements instead.</b></td>
<td align="center" valign="top">No</td>
<td>fork</td>
<td>if enabled triggers the class execution in another JVM.</td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">maxmemory</td>
<td valign="top">Max amount of memory to allocate to the forked VM
(ignored if fork is disabled)</td>
<td align="center" valign="top">No</td>
<td>spawn</td>
<td>if enabled allows to start a process which will outlive Ant.<br/>Requires
that <var>fork</var> is <q>true</q>, and not compatible
with <var>timeout</var>, <var>input</var>, <var>output</var>, <var>error</var>, <var>result</var>
attributes</td>
<td>No; default is <q>false</q></td>
</tr>
<tr>
<td valign="top">module</td>
<td valign="top">The initial or main module to resolve. To specify
the module main class use the <a href="#classname">classname</a> attribute.
Fork must be set to true if this option is selected. <em>since Ant 1.9.7</em></td>
<td align="center" valign="top">Either <tt>jar</tt>, <tt>classname</tt> or <tt>module</tt></td>
<td>jvm</td>
<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>.
</td>
<td>No, default is <q>java</q></td>
</tr>
<tr>
<td valign="top">modulepath</td>
<td valign="top">Specify where to find application modules. A list of directories of modules, module files or exploded modules. <em>since Ant 1.9.7</em></td>
<td align="center" valign="top">No</td>
<td>jvmargs</td>
<td>the arguments to pass to the forked JVM, ignored if <var>fork</var> is
disabled. <em><u>Deprecated</u>, use nested <code><jvmarg></code> elements
instead.</em></td>
<td>No</td>
</tr>
<tr>
<td valign="top">modulepathref</td>
<td valign="top">The modulepath to use, given as <a
href="../using.html#references">reference</a> to a PATH defined elsewhere.
<em>since Ant 1.9.7</em></td>
<td align="center" valign="top">No</td>
<td>maxmemory</td>
<td>Max amount of memory to allocate to the forked JVM, ignored if <var>fork</var>
is <q>false</q></td>
<td>No</td>
</tr>
<tr>
<td valign="top">failonerror</td>
<td valign="top">Stop the buildprocess if the command exits with a
returncode other than 0. Default is "false" (see <a href="#failonerror">note</a>)</td>
<td align="center" valign="top">No</td>
<td>failonerror</td>
<td>Stop the build process if the command exits with a return code other than 0.</td>
<td>No; default is <q>false</q> (see <a href="#failonerror">note</a>)</td>
</tr>
<tr>
<td valign="top">resultproperty</td>
<td valign="top">The name of a property in which the return code of the
command should be stored. Only of interest if failonerror=false
and if fork=true.</td>
<td align="center" valign="top">No</td>
<td>resultproperty</td>
<td>The name of a property in which the return code of the command should be stored. Only of
interest if <var>failonerror</var> is <q>false</q> and if <var>fork</var> is <q>true</q>.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">dir</td>
<td valign="top">The directory to invoke the VM in. (ignored if
fork is disabled)</td>
<td align="center" valign="top">No</td>
<td>dir</td>
<td>The directory to invoke the JVM in, ignored if <var>fork</var> is <q>false</q>.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">output</td>
<td valign="top">Name of a file to which to write the output. If the error stream
is not also redirected to a file or property, it will appear in this output.</td>
<td align="center" valign="top">No</td>
<td>output</td>
<td>Name of a file to which to write the output. If the error stream is not also redirected to a
file or property, it will appear in this output.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">error</td>
<td valign="top">The file to which the standard error of the command should be
redirected.</td>
<td align="center" valign="top">No</td>
<td>error</td>
<td>The file to which the standard error of the command should be redirected.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">logError</td>
<td valign="top">This attribute is used when you wish to see error output in Ant's
log and you are redirecting output to a file/property. The error
output will not be included in the output file/property. If you
redirect error with the "error" or "errorProperty"
attributes, this will have no effect.</td>
<td align="center" valign="top">No</td>
<td>logError</td>
<td>This attribute is used when you wish to see error output in Ant's log and you are
redirecting output to a file/property. The error output will not be included in the output
file/property. If you redirect error with the <var>error</var> or <var>errorProperty</var>
attributes, this will have no effect.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">append</td>
<td valign="top">Whether output and error files should be appended to or overwritten.
Defaults to false.</td>
<td align="center" valign="top">No</td>
<td>append</td>
<td>Whether output and error files should be appended to or overwritten.</td>
<td>No; defaults to <q>false</q></td>
</tr>
<tr>
<td valign="top">outputproperty</td>
<td valign="top">The name of a property in which the output of the
command should be stored. Unless the error stream is redirected to a separate
file or stream, this property will include the error output.</td>
<td align="center" valign="top">No</td>
<td>outputproperty</td>
<td>The name of a property in which the output of the command should be stored. Unless the error
stream is redirected to a separate file or stream, this property will include the error
output.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">errorproperty</td>
<td valign="top">The name of a property in which the standard error of the
command should be stored.</td>
<td align="center" valign="top">No</td>
<td>errorproperty</td>
<td>The name of a property in which the standard error of the command should be stored.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">input</td>
<td valign="top">A file from which the executed command's standard input
is taken. This attribute is mutually exclusive with the
inputstring attribute</td>
<td align="center" valign="top">No; default is to take standard input from console
(unless <code>spawn="true"</code>)</td>
<td>input</td>
<td>A file from which the executed command's standard input is taken. This attribute is mutually
exclusive with the <var>inputstring</var> attribute</td>
<td>No; default is to take standard input from console
unless <var>spawn</var> is <q>true</q></td>
</tr>
<tr>
<td valign="top">inputstring</td>
<td valign="top">A string which serves as the input stream for the
executed command. This attribute is mutually exclusive with the
input attribute.</td>
<td align="center" valign="top">No; default is to take standard input from console
(unless <code>spawn="true"</code>)</td>
<td>inputstring</td>
<td>A string which serves as the input stream for the executed command. This attribute is
mutually exclusive with the <var>input</var> attribute.</td>
<td>No; default is to take standard input from console unless <var>spawn</var>
is <q>true</q>)</td>
</tr>
<tr>
<td valign="top">newenvironment</td>
<td valign="top">Do not propagate old environment when new
environment variables are specified. Default is "false"
(ignored if fork is disabled).</td>
<td align="center" valign="top">No</td>
<td>newenvironment</td>
<td>Do not propagate old environment when new environment variables are specified.</td>
<td>No; default is <q>false</q>, ignored if <var>fork</var> is <q>false</q></td>
</tr>
<tr>
<td valign="top">timeout</td>
<td valign="top">Stop the command if it doesn't finish within the
specifiedtime (given in milliseconds). <strong>It is highly
recommended to use this feature only if fork is enabled.</strong></td>
<td align="center" valign="top">No</td>
<td>timeout</td>
<td>Stop the command if it doesn't finish within the specified time (given in
milliseconds). <strong>It is highly recommended to use this feature only if <var>fork</var>
is <q>true</q>.</strong></td>
<td>No</td>
</tr>
<tr>
<td valign="top">clonevm</td>
<td valign="top">If set to true, then all system properties
and the bootclasspath of the forked Java Virtual Machine will be
the same as those of the Java VM running Ant. Default is
"false" (ignored if fork is disabled).
<em>since Ant 1.7</em></td>
<td align="center" valign="top">No</td>
<td>clonevm</td>
<td>If set to <q>true</q>, then all system properties and the <var>bootclasspath</var> of the
forked JVM will be the same as those of the JVM running Ant. <em>since Ant 1.7</em></td>
<td>No; default is <q>false</q>, ignored if <var>fork</var> is <q>false</q></td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>arg and jvmarg</h4>
<p>Use nested <code><arg></code> and <code><jvmarg></code>
elements to specify arguments for the Java class and the forked VM respectively.
See <a href="../using.html#arg">Command line arguments</a>.</p>
<p>Use nested <code><arg></code> and <code><jvmarg></code> elements to specify arguments
for the Java class and the forked JVM respectively. See <a href="../using.html#arg">Command line
arguments</a>.</p>
<h4>sysproperty</h4>
<p>Use nested <code><sysproperty></code>
elements to specify system properties required by the class.
These properties will be made available to the VM during the execution
of the class (either ANT's VM or the forked VM). The attributes
for this element are the same as for <a href="exec.html#env">environment
variables</a>.</p>
<p>Use nested <code><sysproperty></code> elements to specify system properties required by the
class. These properties will be made available to JVM during the execution of the class (either
Ant's JVM or the forked JVM). The attributes for this element are the same as
for <a href="exec.html#env">environment variables</a>.</p>
<h4>syspropertyset</h4>
@@ -257,49 +231,42 @@ with <a href="../Types/propertyset.html">syspropertyset</a>s.</p>
<p><em>since Ant 1.6</em>.</p>
<h4>classpath</h4>
<p><code>Java</code>'s <i>classpath</i> attribute is a <a
href="../using.html#path">PATH like structure</a> and can also be set via a nested
<i>classpath</i> element.</p>
<p><code>Java</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 <code>classpath</code> element.</p>
<h4>bootclasspath</h4>
<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 <i>fork</i> is not <code>true</code> or the target VM doesn't
support it (i.e. Java 1.1).</p>
<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>
is not <q>true</q> or the target JVM doesn't support it (i.e. Java 1.1).</p>
<p><em>since Ant 1.6</em>.</p>
<h4>env</h4>
<p>It is possible to specify environment variables to pass to the
forked VM via nested <i>env</i> elements. See the description in the
section about <a href="exec.html#env">exec</a></p>
<p>Settings will be ignored if fork is disabled.</p>
<p>It is possible to specify environment variables to pass to the forked JVM via
nested <code>env</code> elements. See the description in the section
about <a href="exec.html#env">exec</a></p>
<p>Settings will be ignored if <var>fork</var> is <q>false</q>.</p>
<h4>permissions</h4>
<p>Security permissions can be revoked and granted during the execution of the
class via a nested <i>permissions</i> element. For more information please
see <a href="../Types/permissions.html">permissions</a></p>
<p>When the permission RuntimePermission exitVM has not been granted (or has
been revoked) the System.exit() call will be intercepted
and treated like indicated in <i>failonerror</i>.</p>
<p><strong>Note</strong>:<br>
If you do not specify permissions,
a set of default permissions will be added to your Java invocation to make
sure that the Ant run will continue or terminated as indicated by
<i>failonerror</i>. All permissions not granted per default will be
checked by whatever security manager was already in place. exitVM will be
disallowed.
</p>
<p>Settings will be ignored if fork is enabled.</p>
<p>Security permissions can be revoked and granted during the execution of the class via a
nested <code>permissions</code> element. For more information please
see <a href="../Types/permissions.html">permissions</a>.</p>
<p>When the permission <code>RuntimePermission exitVM</code> has not been granted (or has been
revoked) the <code>System.exit()</code> call will be intercepted and treated like indicated
in <var>failonerror</var>.</p>
<p><strong>Note</strong>:<br/> If you do not specify permissions, a set of default permissions will
be added to your Java invocation to make sure that the Ant run will continue or terminated as
indicated by <var>failonerror</var>. All permissions not granted per default will be checked by
whatever security manager was already in place. <code>exitVM</code> will be disallowed.</p>
<p>Settings will be ignored if <var>fork</var> is <q>true</q>.</p>
<p><em>since Ant 1.6</em>.</p>
<h4>assertions</h4>
<p>You can control enablement of Java 1.4 assertions with an
<p>Invokes the <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> parser.</p>
<p>This parser "traverses a set of Java source file directories and generates design quality metrics for each Java package".
It allows to "automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to
effectively manage and control package dependencies."</p>
<p>This parser "traverses a set of Java source file directories and generates design quality
metrics for each Java package". It allows to "automatically measure the quality of a
design in terms of its extensibility, reusability, and maintainability to effectively manage and
control package dependencies."</p>
<p>Source file directories are defined by nested
<code><sourcespath></code>; Class file directories are defined
by nested <code><classespath></code>, see <a
href="#nested">nested elements</a>.</p>
<p>Source file directories are defined by nested <code><sourcespath></code>. Class file
directories are defined by nested <code><classespath></code>. See <a href="#nested">nested
elements</a>.</p>
<p>Optionally, you can also set the <code>outputfile</code> name where the output is stored. By default the task writes its report to the standard output.</P>
<p>Optionally, you can also set the <var>outputfile</var> name where the output is stored. By
default the task writes its report to the standard output.</p>
<p>The task requires at least the JDepend 1.2 version.</p>
<td valign="top">The output file name. If not set, the output is printed on the standard output.</td>
<td align="center" valign="top">No</td>
<td>outputfile</td>
<td>The output file name. If not set, the output is printed on the standard output.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">format</td>
<td valign="top">The format to write the output in. The default is "text", the alternative is "xml"</td>
<td align="center" valign="top">No</td>
<td>format</td>
<td>The format to write the output in,
either <q>text</q> (default) or <q>xml</q></td>
<td>No; the default is <q>text</q></td>
</tr>
<tr>
<td valign="top">fork</td>
<td valign="top">Run the tests in a separate VM.</td>
<td align="center" valign="top">No, default is "off"</td>
<td>fork</td>
<td>Run the tests in a separate JVM.</td>
<td>No; default is <q>off</q></td>
</tr>
<tr>
<td valign="top">haltonerror</td>
<td valign="top">Stop the build process if an error occurs during the jdepend analysis.</td>
<td align="center" valign="top">No, default is "off"</td>
<td>haltonerror</td>
<td>Stop the build process if an error occurs during the <code>jdepend</code> analysis.</td>
<td>No; default is <q>off</q></td>
</tr>
<tr>
<td valign="top">timeout</td>
<td valign="top">Cancel the operation if it doesn't finish in the given time (measured in milliseconds). (Ignored if fork is disabled.)</td>
<td align="center" valign="top">No</td>
<td>timeout</td>
<td>Cancel the operation if it doesn't finish in the given time (measured in milliseconds).</td>
<td>No, ignored if <var>fork</var> is <q>false</q></td>
</tr>
<tr>
<td valign="top">jvm</td>
<td valign="top">The command used to invoke the Java Virtual Machine, default is 'java'. The command is resolved by java.lang.Runtime.exec(). (Ignored if fork is disabled.)</td>
<br>Upgrade Xalan using the JDK endorsement mechanism</i></td></tr>
<tr><td>2.x</td><td>JDK 1.4.x</td><td><em><u>Deprecated</u>, use <samp>${ant.home}/etc/junit-frames-xalan1.xsl</samp>
<br/>Upgrade Xalan using the JDK endorsement mechanism</em></td></tr>
</table>
<p>In Ant 1.6.2, we had to decide between supporting Xalan 1/Xalan 2.4.1-
and Xalan 2.4.1+/XSLTC, because there was no way to support both couples at the same
time.</p>
<p><em>Since Ant 1.7</em>, we dropped support for Xalan 1, because Xalan 1 was not
available anymore for quite some time.</p>
<p>In Ant 1.6.2, we had to decide between supporting Xalan 1/Xalan 2.4.1- and Xalan 2.4.1+/XSLTC,
because there was no way to support both couples at the same time.</p>
<p><em>Since Ant 1.7</em>, we dropped support for Xalan 1, because Xalan 1 was not available anymore
for quite some time.</p>
<h3>Parameters</h3>
<table>
<table class="attr">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td valign="top"><b>Required</b></td>
<th>Attribute</th>
<th>Description</th>
<th>Required</th>
</tr>
<tr>
<td valign="top">tofile</td>
<td valign="top">The name of the XML file that will aggregate all individual
XML testsuite previously generated by the JUnit task.</td>
<td align="center" valign="top">No. Default to TESTS-TestSuites.xml</td>
<td>tofile</td>
<td>The name of the XML file that will aggregate all individual XML testsuites previously
generated by the <code>JUnit</code> task.</td>
<td>No; defaults to <samp>TESTS-TestSuites.xml</samp></td>
</tr>
<tr>
<td valign="top">todir</td>
<td valign="top">The directory where should be written the file resulting
from the individual XML testsuite aggregation.</td>
<td align="center" valign="top">No. Default to current directory</td>
<td>todir</td>
<td>The directory where the file resulting from the individual XML testsuite aggregation should
be written.</td>
<td>No; defaults to current directory</td>
</tr>
</table>
<h3 id="nested">Nested Elements</h3>
<h4>fileset</h4>
<p><code>junitreport</code> collects individual xml files generated by the JUnit
task using the nested <a href="../Types/fileset.html"><code><FileSet></code></a>
element.</p>
<p><code>junitreport</code> collects individual xml files generated by the <code>JUnit</code> task
using the nested <a href="../Types/fileset.html"><code><FileSet></code></a> element.</p>
<h4>report</h4>
<p>Generate a browsable report based on the document created by the merge.</p>
<h3>Parameters</h3>
<table>
<table class="attr">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td valign="top"><b>Required</b></td>
<th>Attribute</th>
<th>Description</th>
<th>Required</th>
</tr>
<tr>
<td valign="top">format</td>
<td valign="top">The format of the generated report. Must be "noframes"
or "frames".</td>
<td align="center" valign="top">No, default to "frames"</td>
<td>format</td>
<td>The format of the generated report. Must be either <q>noframes</q> or <q>frames</q>.</td>
<td>No; defaults to <q>frames</q></td>
</tr>
<tr>
<td valign="top">styledir</td>
<td valign="top">The directory where the stylesheets are defined. They must
be conforming to the following conventions:
<td>styledir</td>
<td>The directory where the stylesheets are defined. They must be conforming to the following
conventions:
<ul>
<li>frames format: the stylesheet must be named <i>junit-frames.xsl</i>, or <i>junit-frames-saxon.xsl if you are using Saxon 9+.</li>
<li>noframes format: the stylesheet must be named <i>junit-noframes.xsl</i>, or <i>junit-noframes-saxon.xsl if you are using Saxon 9+.</li>
<li><q>frames</q> format: the stylesheet must be named <samp>junit-frames.xsl</samp>, or <i>junit-frames-saxon.xsl if you are using Saxon 9+.</li>
<li><q>noframes</q> format: the stylesheet must be named <samp>junit-noframes.xsl</samp>, or <i>junit-noframes-saxon.xsl if you are using Saxon 9+.</li>
</ul>
</td>
<td align="center" valign="top">No. Default to embedded stylesheets.</td>
<td>No; defaults to embedded stylesheets</td>
</tr>
<tr>
<td valign="top">todir</td>
<td valign="top">The directory where the files resulting from the
transformation should be written to.</td>
<td align="center" valign="top">No. Default to current directory</td>
<td>todir</td>
<td>The directory where the files resulting from the transformation should be written to.</td>
<td>No; defaults to current directory</td>
</tr>
</table>
<p>Ant assumes the following concerning the <tt>frames</tt> and <tt>noframes</tt> formats:</p>
<p>The <tt>frames</tt> format uses
a stylesheet which is generating output <em>only</em> by redirecting.</p>
<p>The
<tt>noframes</tt> format does not use redirecting and generates one
file called <tt>junit-noframes.html</tt>.</p>
<p>Custom versions of <tt>junit-frames.xsl</tt> or <tt>junit-noframes.xsl</tt> must adhere to the above conventions.</p>
<p>Ant assumes the following concerning the <q>frames</q> and <q>noframes</q> formats:</p>
<ul>
<li>The <q>frames</q> format uses a stylesheet which is generating output <em>only</em> by
redirecting.</li>
<li>The <q>noframes</q> format does not use redirecting and generates one file
called <samp>junit-noframes.html</samp>.</li>
</ul>
<p>Custom versions of <samp>junit-frames.xsl</samp> or <samp>junit-noframes.xsl</samp> must adhere
to the above conventions.</p>
<h3>Nested Element of the report tag</h3>
<h4>param</h4>
<em>Since Ant 1.7</em>the report tag supports nested param tags.
These tags can pass XSL parameters to the stylesheet.
<p><em>Since Ant 1.7</em>, the <var>report</var> tag supports nested <code>param</code> tags. These
tags can pass XSL parameters to the stylesheet.</p>
<p>Stores the relative path in <code>foo</code>: <samp>cvs/my/file.txt</samp></p>
<h3>Property Files</h3>
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>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>
<ol>
<li>If the file is not there, nothing is printed except at -verbose log
level. This lets you have optional configuration files for every
project, that team members can customize.
<li>The rules for this format match <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load%28java.io.InputStream%29">java.util.Properties</a>.</li>
<li>Trailing spaces are not stripped. It may have been what you wanted.</li>
<li>Want unusual characters? Escape them \u0456 or \" style.</li>
<li>Ant Properties are expanded in the file</li>
<li>If you want to expand properties defined inside the same file and
you use the prefix attribute of the task, you must use the same
prefix when expanding the properties or
set <code>prefixValues</code> to true.</li>
<li>If the file is not there, nothing is printed except at <code>-verbose</code> log level. This
lets you have optional configuration files for every project, that team members can customize.
<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-">java.util.Properties</a>.</li>
<li>Trailing spaces are not stripped. It may have been what you wanted.</li>
<li>Want unusual characters? Escape them <code>\u0456</code> or <code>\"</code> style.</li>
<li>Ant Properties are expanded in the file</li>
<li>If you want to expand properties defined inside the same file and you use
the <var>prefix</var> attribute of the task, you must use the same prefix when expanding the
properties or set <var>prefixValues</var> to <q>true</q>.</li>
</ol>
In-file property expansion is very cool. Learn to use it.
<p>
Example:
<p>In-file property expansion is very cool. Learn to use it.</p>
<p>Ant runs on Java 1.2 therefore it cannot use Java 5 features for accessing environment
variables. So it starts a command in a new process which prints the environment variables, analyzes
the output and creates the properties.<br/> There are commands for the following operating systems
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">Execute.java</a>
<td valign="top">Name of the property name/value pair</td>
<td valign="top" align="center">Yes</td>
<td>key</td>
<td>Name of the property name/value pair</td>
<td>Yes</td>
</tr>
<tr>
<td valign="top">value</td>
<td valign="top">Value to set (=), to add (+) or subtract (-)</td>
<td valign="top" align="center" rowspan="2">At least one must be specified, if <i>operation</i> is not <i>delete</i></td>
<td>value</td>
<td>Value to set (<q>=</q>), to add (<q>+</q>) or subtract (<q>-</q>)</td>
<td rowspan="2">At least one must be specified, if <var>operation</var> is not <q>del</q></td>
</tr>
<tr>
<td valign="top">default</td>
<td valign="top">Initial value to set for a property if it is not
already defined in the property file.<br>
For type date, an additional keyword is allowed: "now"</td>
</tr>
<td>default</td>
<td class="left">Initial value to set for a property if it is not already defined in the
property file.<br/>For type <var>date</var>, an additional keyword is
allowed: <q>now</q></td></tr>
<tr>
<td valign="top">type</td>
<td valign="top">Regard the value as: int, date or string (default)</td>
<td valign="top" align="center">No</td>
<td>type</td>
<td>Regard the value as: <q>int</q>, <q>date</q> or <q>string</q> (default)</td>
<td>No; defaults to <q>string</q></td>
</tr>
<tr>
<td valign="top">operation</td>
<td valign="top">One of the following operations:<br><br>
<b>for all datatypes:</b><ul>
<li>"del" : deletes an entry</li>
<li>"+" : adds a value to the existing value</li>
<li>"=" : sets a value instead of the existing value (default)</li>
</ul><br><b>for date and int only:</b><ul>
<li>"-" : subtracts a value from the existing value</li>
</ul>
<td>operation</td>
<td>One of the following operations:<br><br>
<strong>for all datatypes:</strong>
<ul>
<li><q>del</q> : deletes an entry</li>
<li><q>+</q> : adds a value to the existing value</li>
<li><q>=</q> : sets a value instead of the existing value (default)</li>
</ul>
<strong>for <var>date</var> and <var>int</var> only:</strong>
<ul>
<li><q>-</q> : subtracts a value from the existing value</li>
</ul>
</td>
<td valign="top" align="center">No</td>
<td>No; defaults to <q>=</q></td>
</tr>
<tr>
<td valign="top">pattern</td>
<td valign="top">For int and date type only. If present, Values will
be parsed and formatted accordingly.</td>
<td valign="top" align="center">No</td>
<td>pattern</td>
<td>For <var>int</var> and <var>date</var> type only. If present, values will be parsed and
formatted accordingly.</td>
<td>No</td>
</tr>
<tr>
<td valign="top">unit</td>
<td valign="top">The unit of the value to be applied to date +/- operations.
Valid Values are:
<ul>
<li>millisecond</li>
<li>second</li>
<li>minute</li>
<li>hour</li>
<li>day (default)</li>
<li>week</li>
<li>month</li>
<li>year</li>
</ul>
This only applies to date types using a +/- operation.
<td>unit</td>
<td>The unit of the value to be applied to <var>date</var><q>+</q>/<q>-</q> operations. Valid
Values are:
<ul>
<li><q>millisecond</q></li>
<li><q>second</q></li>
<li><q>minute</q></li>
<li><q>hour</q></li>
<li><q>day</q> (default)</li>
<li><q>week</q></li>
<li><q>month</q></li>
<li><q>year</q></li>
</ul>
This only applies to <var>date</var> types using a <q>+</q>/<q>-</q> operation.
</td>
<td align="center" valign="top">No</td>
<td>No; defaults to <q>day</q></td>
</tr>
</table>
<p>The rules used when setting a property value are shown below. The
operation occurs <b>after</b> these rules are considered.</p>
<p>The rules used when setting a property value are shown below. The operation
occurs <strong>after</strong> these rules are considered.</p>
<ul>
<li>If only value is specified, the property is set to it regardless of its
previous value.</li>
<li>If only default is specified and the property previously existed in the
property file, it is unchanged.</li>
<li>If only default is specified and the property did not exist in the
propertyfile, the property is set to default.</li>
<li>If value and default are both specified and the property previously
existed in the property file, the property is set to value.</li>
<li>If value and default are both specified and the property did not exist in
the property file, the property is set to default.</li>
<li>If only <var>value</var> is specified, the property is set to it regardless of its previous
value.</li>
<li>If only <var>default</var> is specified and the property previously existed in the property
file, it is unchanged.</li>
<li>If only <var>default</var> is specified and the property did not exist in the property file,
the property is set to <var>default</var>.</li>
<li>If <var>value</var> and <var>default</var> are both specified and the property previously
existed in the property file, the property is set to <var>value</var>.</li>
<li>If <var>value</var> and <var>default</var> are both specified and the property did not exist
in the property file, the property is set to <var>default</var>.</li>
</ul>
<h3>Examples</h3>
<p>The following changes the my.properties file. Assume my.properties look like:</p>
<p>The following changes the <samp>my.properties</samp> file. Assume <samp>my.properties</samp>
looks like:</p>
<pre># A string value
akey=original value
@@ -167,8 +166,7 @@ akey=original value
# each time the build is run.
anint=1</pre>
<p>After running, the file would now look like
</p>
<p>After running, the file would now look like</p>
<pre>#My properties
#Wed Aug 31 13:47:19 BST 2005
# A string value
@@ -183,63 +181,55 @@ adate=2005/08/31 13\:47
formated.int=0014
formated.date=243 13\:47</pre>
<p>
The slashes conform to the expectations of the Properties class. The file will be stored in a manner so that each character is examined and escaped if necessary.
</p>
<p>
The layout and comment of the original file is preserved. New properties are added at the end of the file. Existing properties are overwritten in place.
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.