You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2018/02/28 07:01:51 UTC
[36/47] ant git commit: Use HTML 5(-ish), fix links
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/jar.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/jar.html b/manual/Tasks/jar.html
index c2631a3..5eebfba 100644
--- a/manual/Tasks/jar.html
+++ b/manual/Tasks/jar.html
@@ -27,522 +27,466 @@
<h2 id="jar">Jar</h2>
<h3>Description</h3>
<p>Jars a set of files.</p>
-<p>The <i>basedir</i> attribute is the reference directory from where to jar.</p>
+<p>The <var>basedir</var> attribute is the reference directory from where to jar.</p>
<p>Note that file permissions will not be stored in the resulting jarfile.</p>
-<p>It is possible to refine the set of files that are being jarred. This can be
-done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
-attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
-have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
-the files you want to have excluded. This is also done with patterns. And
-finally with the <i>defaultexcludes</i> attribute, you can specify whether you
-want to use default exclusions or not. See the section on <a
-href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
+
+<p>It is possible to refine the set of files that are being jarred. This can be done with
+the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, <var>excludesfile</var>
+and <var>defaultexcludes</var> attributes. With the <var>includes</var> or <var>includesfile</var>
+attribute you specify the files you want to have included by using patterns. The <var>exclude</var>
+or <var>excludesfile</var> attribute is used to specify the files you want to have excluded. This is
+also done with patterns. And finally with the <var>defaultexcludes</var> attribute, you can specify
+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
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 most attributes of <code><fileset></code>
-(<code>dir</code> becomes <code>basedir</code>) as well as the nested
-<code><include></code>, <code><exclude></code> and
-<code><patternset></code> elements.</p>
-<p>You can also use nested file sets for more flexibility, and specify
-multiple ones to merge together different trees of files into one JAR.
-The extended fileset and groupfileset child elements from the zip task are
-also available in the jar task.
-See the <a href="zip.html">Zip</a> task for more details and examples.</p>
-
-<p>The <code>update</code> parameter controls what happens if the JAR
-file already exists. When set to <code>yes</code>, the JAR file is
-updated with the files specified. When set to <code>no</code> (the
-default) the JAR file is overwritten. An example use of this is
-provided in the <a href="zip.html">Zip task documentation</a>. Please
-note that ZIP files store file modification times with a granularity
-of two seconds. If a file is less than two seconds newer than the
-entry in the archive, Ant will not consider it newer.</p>
+
+<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
+attributes of <code><fileset></code> (<var>dir</var> becomes <var>basedir</var>) as well as
+the nested <code><include></code>, <code><exclude></code>
+and <code><patternset></code> elements.</p>
+<p>You can also use nested file sets for more flexibility, and specify multiple ones to merge
+together different trees of files into one JAR. The extended <code>fileset</code>
+and <code>groupfileset</code> child elements from the <code>zip</code> task are also available in
+the <code>jar</code> task. See the <a href="zip.html">Zip</a> task for more details and
+examples.</p>
+
+<p>The <var>update</var> parameter controls what happens if the JAR file already exists. When set
+to <q>yes</q>, the JAR file is updated with the files specified. When set to <q>no</q> (the default)
+the JAR file is overwritten. An example use of this is provided in the <a href="zip.html">Zip task
+documentation</a>. Please note that ZIP files store file modification times with a granularity of 2
+seconds. If a file is less than 2 seconds newer than the entry in the archive, Ant will not
+consider it newer.</p>
<p>If the manifest is omitted, a simple one will be supplied by Apache Ant.</p>
-<p>The <code>whenmanifestonly</code> parameter controls what happens when no
-files, apart from the manifest file, or nested services, match.
-If <code>skip</code>, the JAR is not created and a warning is issued.
-If <code>fail</code>, the JAR is not created and the build is halted with an error.
-If <code>create</code>, (default) an empty JAR file (only containing a manifest and services)
-is created.</p>
-
-<p>(The Jar task is a shortcut for specifying the manifest file of a JAR file.
-The same thing can be accomplished by using the <i>fullpath</i>
-attribute of a zipfileset in a Zip task. The one difference is that if the
-<i>manifest</i> attribute is not specified, the Jar task will
-include an empty one for you.)</p>
-
-<p>Manifests are processed by the Jar task according to the
-<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html">Jar file specification.</a>
-Note in particular that this may result in manifest lines greater than 72 bytes
+<p>The <var>whenmanifestonly</var> parameter controls what happens when no files, apart from the
+manifest file, or nested services, match. If <q>skip</q>, the JAR is not created and a warning is
+issued. If <q>fail</q>, the JAR is not created and the build is halted with an error.
+If <q>create</q> (default), an empty JAR file (only containing a manifest and services) is
+created.</p>
+
+<p>(The <code>Jar</code> task has a shortcut for specifying the manifest file of a JAR file. The
+same thing can be accomplished by using the <var>fullpath</var> attribute of
+a <code>zipfileset</code> in a <code>Zip</code> task. The one difference is that if
+the <var>manifest</var> attribute is not specified, the <code>Jar</code> task will include an empty
+one for you.)</p>
+
+<p>Manifests are processed by the <code>Jar</code> task according to the <a target="_blank"
+href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html">Jar file
+specification.</a> Note in particular that this may result in manifest lines greater than 72 bytes
being wrapped and continued on the next line.</p>
-<p>The Jar task checks whether you specified package information according to the
-<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/versioning/spec/versioning2.html#wp90779">
+<p>The <code>Jar</code> task checks whether you specified package information according to
+the <a target="_blank"
+href="https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp90779">
versioning specification</a>.</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>
-<p>To cryptographically sign your JAR file, use the <a href="signjar.html">SignJar task</a> on the JAR that you create from this task.</p>
+<p>To cryptographically sign your JAR file, use the <a href="signjar.html">SignJar task</a> on the
+JAR that you create from this task.</p>
-<p>For creating a simple version of a <a target="_blank" href="http://openjdk.java.net/jeps/238">JEP 238 multi-release jar</a>,
-you don't need any special tools. Just set the required manifest entry and place the files where required, as you could see
-in the <a href="#jep238-example">JEP 238 example</a>. If you want to tune this kind of jar, e.g. decreasing the size by deleting
-'same' classes from the versions-branches, you have to do more ...</p>
+<p>For creating a simple version of a <a target="_blank" href="http://openjdk.java.net/jeps/238">JEP
+238 multi-release jar</a>, you don't need any special tools. Just set the
+required <code>manifest</code> entry and place the files where required, as you could see in
+the <a href="#jep238-example">JEP 238 example</a>. If you want to tune this kind of jar,
+e.g. decreasing the size by deleting 'same' classes from the versions-branches, you have to do more
+...</p>
<h3>Parameters</h3>
-<table>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">destfile</td>
- <td valign="top">the JAR file to create.</td>
- <td valign="top" align="center">Yes</td>
+ <td>destfile</td>
+ <td>the JAR file to create.</td>
+ <td>Yes</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 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>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">index</td>
- <td valign="top">whether to create an <a
- href="http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR_Index">index
- list</a> to speed up classloading. This is a JDK 1.3+ specific
- feature. Unless you specify additional jars with nested <a
- href="#indexjars"><code>indexjars</code></a> elements, only the
- contents of this jar will be included in the index. Defaults to
- false.</td>
- <td valign="top" align="center">No</td>
- </tr>
- <tr>
- <td valign="top">indexMetaInf</td>
- <td valign="top">whether to include META-INF and its children in
- the index. Doesn't have any effect if <em>index</em> is
- false.<br/>
- Sun's jar implementation used to skip the META-INF 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 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>
- </tr>
- <tr>
- <td valign="top">manifestencoding</td>
- <td valign="top">The encoding used to read the JAR manifest, when
- a manifest file is specified. The task will always use UTF-8
- when writing the manifest.</td>
- <td valign="top" align="center">No, defaults to the platform encoding.</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>
- </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>
- </tr>
- <tr>
- <td valign="top">strict</td>
- <td valign="top">Configures how to handle breaks of the packaging version
- specification: <ul>
- <li><b>fail</b> = throws a BuildException</li>
- <li><b>warn</b> = logs a message on warn level</li>
- <li><b>ignore</b> = logs a message on verbose level (default)</li>
- </ul>
- <em>Since Ant 1.7.1</em></td>
- <td valign="top" align="center">No, defaults to <tt>ignore</tt>.</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>No; defaults to <q>skip</q></td>
+ </tr>
+ <tr>
+ <td>update</td>
+ <td>indicates whether to update or overwrite the destination file if it already exists</td>
+ <td>No; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <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>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; defaults to <q>add</q></td>
+ </tr>
+ <tr>
+ <td>index</td>
+ <td>whether to create
+ an <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JAR_Index">index
+ list</a> to speed up classloading. This is a JDK 1.3+ specific feature. Unless you specify
+ additional jars with nested <a href="#indexjars"><code>indexjars</code></a> elements, only the
+ contents of this jar will be included in the index.</td>
+ <td>No; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <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 <q>false</q>.<br/>Sun'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. <em>Since Ant 1.8.0</em></td>
+ <td>No; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <td>manifestencoding</td>
+ <td>The encoding used to read the JAR manifest, when a manifest file is specified. The task
+ will always use UTF-8 when writing the manifest.</td>
+ <td>No; defaults to default JVM character encoding</td>
+ </tr>
+ <tr>
+ <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. <em>Since Ant 1.6.2</em></td>
+ <td>No; defaults to <q>true</q></td>
+ </tr>
+ <tr>
+ <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>strict</td>
+ <td>Configures how to handle breaks of the packaging version specification:
+ <ul>
+ <li><q>fail</q> = throws a BuildException</li>
+ <li><q>warn</q> = logs a message on warn level</li>
+ <li><q>ignore</q> = logs a message on verbose level (default)</li>
+ </ul>
+ <em>Since Ant 1.7.1</em></td>
+ <td>No; defaults to <q>ignore</q></td>
+ </tr>
+ <tr>
+ <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>
- </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>
- </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>
- </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>
- </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>
- </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>
- </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>No; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <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; defaults to <q>true</q></td>
+ </tr>
+ <tr>
+ <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.<br/>See also the <a href="zip.html#encoding">discussion in the zip task page</a></td>
+ <td>No; defaults to <q>never</q></td>
+ </tr>
+ <tr>
+ <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; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <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; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <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; defaults to <q>false</q></td>
+ </tr>
+ <tr>
+ <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; defaults to <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 jar 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 jar 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</h4>
-<p>The manifest nested element allows the manifest for the Jar file to
-be provided inline in the build file rather than in an external
-file. This element is identical to the
-<a href="manifest.html">manifest</a> task, but the file and mode
+<p>The nested <code>manifest</code> element allows the manifest for the Jar file to be provided
+inline in the build file rather than in an external file. This element is identical to the
+<a href="manifest.html">manifest</a> task, but the <var>file</var> and <var>mode</var>
attributes must be omitted.</p>
-<p>
-If both an inline manifest and an external file are both specified, the
-manifests are merged.
-</p>
-
-<p>When using inline manifests, the Jar task will check whether the manifest
-contents have changed (i.e. the manifest as specified is different in any way
-from the manifest that exists in the Jar, if it exists.
-If the manifest values have changed the jar will be updated or rebuilt, as
-appropriate.
-</p>
+<p>If both an inline manifest and an external file are both specified, the manifests are merged.</p>
+
+<p>When using inline manifests, the <code>Jar</code> task will check whether the manifest contents
+have changed (i.e. the manifest as specified is different in any way from the manifest that exists
+in the jar, if it exists. If the manifest values have changed, the jar will be updated or rebuilt,
+as appropriate.</p>
<h4 id="indexjars">indexjars</h4>
<p><em>since Ant 1.6.2</em></p>
-<p>The nested <code>indexjars</code> element specifies a <a
-href="../using.html#path">PATH like structure</a>. Its content is
-completely ignored unless you set the index attribute of the task to
-true.</p>
+<p>The nested <code>indexjars</code> element specifies a <a href="../using.html#path">path-like
+structure</a>. Its content is completely ignored unless you set the <var>index</var> attribute of
+the task to <q>true</q>.</p>
-<p>The index created by this task will contain indices for the
-archives contained in this path, the names used for the archives
-depend on your manifest:</p>
+<p>The index created by this task will contain indices for the archives contained in this path, the
+names used for the archives depend on your manifest:</p>
<ul>
- <li>If the generated jar's manifest contains no Class-Path
- attribute, the file name without any leading directory path will be
- used and all parts of the path will get indexed.</li>
- <li>If the manifest contains a Class-Path attribute, this task will
- try to guess which part of the Class-Path belongs to a given
- archive. If it cannot guess a name, the archive will be skipped,
- otherwise the name listed inside the Class-Path attribute will be
- used.</li>
+ <li>If the generated jar's manifest contains no <code>Class-Path</code> attribute, the file name
+ without any leading directory path will be used and all parts of the path will get indexed.</li>
+ <li>If the manifest contains a <code>Class-Path</code> attribute, this task will try to guess
+ which part of the <code>Class-Path</code> belongs to a given archive. If it cannot guess a name,
+ the archive will be skipped, otherwise the name listed inside the <code>Class-Path</code>
+ attribute will be used.</li>
</ul>
-<p>This task will not create any index entries for archives that are
- empty or only contain files inside the META-INF directory unless
- the <code>indexmetainf</code> attribute has been set
- to <code>true</code>.</p>
+<p>This task will not create any index entries for archives that are empty or only contain files
+inside the <samp>META-INF</samp> directory unless the <var>indexmetainf</var> attribute has been set
+to <q>true</q>.</p>
<h4 id="service">service</h4>
<p><em>since Ant 1.7.0</em></p>
-<p>
- The nested <code>service</code> element specifies a service.
- Services are described in the
- <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Service_Provider">service provider overview</a>.
- The approach is to have providers JARs include files named by the service
- provided, for example,
- META-INF/services/javax.script.ScriptEngineFactory
- which can include implementation class names, one per line (usually just one per JAR).
-
- The name of the
- service is set by the "type" attribute. The classname implementing
- the service is the the "provider" attribute, or it one wants to
- specify a number of classes that implement the service, by
- "provider" nested elements.
-</p>
-<p>
-<table>
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
- </tr>
- <tr>
- <td valign="top">type</td>
- <td valign="top">The name of the service.</td>
- <td valign="top" align="center">Yes</td>
- </tr>
- <tr>
- <td valign="top">provider</td>
- <td valign="top">
- The classname of the class implementing the service.
- </td>
- <td valign="top" align="center">Yes, unless there is a nested
- <code><provider></code> element.</td>
+<p>The nested <code>service</code> element specifies a service. Services are described in
+the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Service_Provider">service
+provider overview</a>. The approach is to have providers JARs include files named by the service
+provided, for example, <samp>META-INF/services/javax.script.ScriptEngineFactory</samp> which can
+include implementation class names, one per line (usually just one per JAR).</p>
+
+<p>The name of the service is set by the <var>type</var> attribute. The classname implementing the
+service is the the <var>provider</var> attribute, or if one wants to specify a number of classes
+that implement the service, by <code>provider</code> nested elements.</p>
+<table class="attr">
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>The name of the service.</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>provider</td>
+ <td>The classname of the class implementing the service.</td>
+ <td>Yes, unless there is a nested <code><provider></code> element.</td>
</tr>
</table>
- <p>
- The provider classname is specified either by the "provider" attribute, or
- by a nested <provider> element, which has a single "classname" attribute.
- If a JAR file has more that one implementation of the service, a number of
- nested <provider> elements may be used.
- </p>
+<p>The provider classname is specified either by the <var>provider</var> attribute, or by a
+nested <code><provider></code> element, which has a single <var>classname</var> attribute. If
+a JAR file has more that one implementation of the service, a number of
+nested <code><provider></code> elements may be used.</p>
<h3>Examples</h3>
<h4>Simple</h4>
-<pre> <jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/></pre>
-<p>jars all files in the <code>${build}/classes</code> directory into a file
-called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p>
-
+<pre><jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/></pre>
+<p>jars all files in the <samp>${build}/classes</samp> directory into a file
+called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory.</p>
<h4>With filters</h4>
-<pre> <jar destfile="${dist}/lib/app.jar"
- basedir="${build}/classes"
- excludes="**/Test.class"/></pre>
-<p>jars all files in the <code>${build}/classes</code> directory into a file
-called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files
-with the name <code>Test.class</code> are excluded.</p>
-
-<pre> <jar destfile="${dist}/lib/app.jar"
- basedir="${build}/classes"
- includes="mypackage/test/**"
- excludes="**/Test.class"/></pre>
-<p>jars all files in the <code>${build}/classes</code> directory into a file
-called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only
-files under the directory <code>mypackage/test</code> are used, and files with
-the name <code>Test.class</code> are excluded.</p>
+<pre><jar destfile="${dist}/lib/app.jar"
+ basedir="${build}/classes"
+ excludes="**/Test.class"/></pre>
+<p>jars all files in the <samp>${build}/classes</samp> directory into a file
+called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Files with the
+name <samp>Test.class</samp> are excluded.</p>
+
+<pre>
+<jar destfile="${dist}/lib/app.jar"
+ basedir="${build}/classes"
+ includes="mypackage/test/**"
+ excludes="**/Test.class"/></pre>
+<p>jars all files in the <samp>${build}/classes</samp> directory into a file
+called <samp>app.jar</samp> in the <samp>${dist}/lib</samp> directory. Only files under the
+directory <samp>mypackage/test</samp> are used, and files with the name <samp>Test.class</samp> are
+excluded.</p>
<h4>Multiple filesets</h4>
-<pre> <jar destfile="${dist}/lib/app.jar">
+<pre>
+<jar destfile="${dist}/lib/app.jar">
<fileset dir="${build}/classes"
excludes="**/Test.class"/>
<fileset dir="${src}/resources"/>
- </jar></pre>
-<p>jars all files in the <code>${build}/classes</code> directory and also
-in the <code>${src}/resources</code> directory together into a file
-called <code>app.jar</code> in the <code>${dist}/lib</code> directory.
-Files with the name <code>Test.class</code> are excluded.
-If there are files such as <code>${build}/classes/mypackage/MyClass.class</code>
-and <code>${src}/resources/mypackage/image.gif</code>, they will appear
-in the same directory in the JAR (and thus be considered in the same package
-by Java).</p>
+</jar></pre>
+<p>jars all files in the <samp>${build}/classes</samp> directory and also in
+the <samp>${src}/resources</samp> directory together into a file called <samp>app.jar</samp> in
+the <samp>${dist}/lib</samp> directory. Files with the name <samp>Test.class</samp> are excluded.
+If there are files such as <samp>${build}/classes/mypackage/MyClass.class</samp>
+and <samp>${src}/resources/mypackage/image.gif</samp>, they will appear in the same directory in the
+JAR (and thus be considered in the same package by Java).</p>
<h4>Merging archives</h4>
-<pre> <jar destfile="build/main/checksites.jar">
+<pre>
+<jar destfile="build/main/checksites.jar">
<fileset dir="build/main/classes"/>
<zipfileset includes="**/*.class" src="lib/main/some.jar"/>
<manifest>
<attribute name="Main-Class"
- value="com.acme.checksites.Main"/>
+ value="com.acme.checksites.Main"/>
</manifest>
- </jar></pre>
-<p>
- Creates an executable jar file with a main class "com.acme.checksites.Main", and
- embeds all the classes from the jar <code>lib/main/some.jar</code>.
-</p>
+</jar></pre>
+<p>Creates an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and
+embeds all the classes from the jar <samp>lib/main/some.jar</samp>.</p>
-<pre> <jar destfile="build/main/checksites.jar">
+<pre>
+<jar destfile="build/main/checksites.jar">
<fileset dir="build/main/classes"/>
<restrict>
- <name name="**/*.class"/>
- <archives>
- <zips>
- <fileset dir="lib/main" includes="**/*.jar"/>
- </zips>
- </archives>
+ <name name="**/*.class"/>
+ <archives>
+ <zips>
+ <fileset dir="lib/main" includes="**/*.jar"/>
+ </zips>
+ </archives>
</restrict>
<manifest>
- <attribute name="Main-Class"
- value="com.acme.checksites.Main"/>
+ <attribute name="Main-Class"
+ value="com.acme.checksites.Main"/>
</manifest>
- </jar></pre>
-<p>
- Creates an executable jar file with a main class "com.acme.checksites.Main", and
- embeds all the classes from all the jars in <code>lib/main</code>.
-</p>
+</jar></pre>
+<p>Creates an executable jar file with a main class <samp>com.acme.checksites.Main</samp>, and
+embeds all the classes from all the jars in <samp>lib/main</samp>.</p>
<h4>Inline manifest</h4>
-<pre> <jar destfile="test.jar" basedir=".">
+<pre>
+<jar destfile="test.jar" basedir=".">
<include name="build"/>
<manifest>
- <!-- 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> -->
- <attribute name="Permissions" value="sandbox"/>
- <attribute name="Codebase" value="example.com"/>
- <!-- Who is building this jar? -->
- <attribute name="Built-By" value="${user.name}"/>
- <!-- Information about the program itself -->
- <attribute name="Implementation-Vendor" value="ACME inc."/>
- <attribute name="Implementation-Title" value="GreatProduct"/>
- <attribute name="Implementation-Version" value="1.0.0beta2"/>
- <!-- details -->
- <section name="common/MyClass.class">
- <attribute name="Sealed" value="false"/>
- </section>
+ <!-- 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> -->
+ <attribute name="Permissions" value="sandbox"/>
+ <attribute name="Codebase" value="example.com"/>
+ <!-- Who is building this jar? -->
+ <attribute name="Built-By" value="${user.name}"/>
+ <!-- Information about the program itself -->
+ <attribute name="Implementation-Vendor" value="ACME inc."/>
+ <attribute name="Implementation-Title" value="GreatProduct"/>
+ <attribute name="Implementation-Version" value="1.0.0beta2"/>
+ <!-- details -->
+ <section name="common/MyClass.class">
+ <attribute name="Sealed" value="false"/>
+ </section>
</manifest>
- </jar></pre>
-<p>
-This is an example of an inline manifest specification including the version of the build
-program (Implementation-Version). Note that the Built-By attribute will take the value of the Ant
-property ${user.name}. The manifest produced by the above would look like this:
-</p>
-
-<pre>Manifest-Version: 1.0
+</jar></pre>
+<p>This is an example of an inline manifest specification including the version of the build program
+(<code>Implementation-Version</code>). Note that the <code>Built-By</code> attribute will take the
+value of the Ant property <code>user.name</code>. The manifest produced by the above would look like
+this:</p>
+
+<pre>
+Manifest-Version: 1.0
Permissions: sandbox
Codebase: example.com
Built-By: conor
@@ -556,60 +500,48 @@ Sealed: false</pre>
<h4>Service Provider</h4>
-<p>
- The following shows how to create a jar file specifying a service
- with an implementation of the JDK 6 scripting interface:
-</p>
-<pre><jar destfile="pinky.jar">
- <fileset dir="build/classes"/>
- <service type="javax.script.ScriptEngineFactory"
- provider="org.acme.PinkyLanguage"/>
-</jar>
-</pre>
-
-<p>
- The following shows how to create a jar file specifying a service
- with two implementations of the JDK 6 scripting interface:
-</p>
+<p>The following shows how to create a jar file specifying a service with an implementation of the
+JDK 6 scripting interface:</p>
+<pre>
+<jar destfile="pinky.jar">
+ <fileset dir="build/classes"/>
+ <service type="javax.script.ScriptEngineFactory"
+ provider="org.acme.PinkyLanguage"/>
+</jar></pre>
+
+<p>The following shows how to create a jar file specifying a service with two implementations of the
+JDK 6 scripting interface:</p>
<pre>
<jar destfile="pinkyandbrain.jar">
- <fileset dir="classes"/>
- <service type="javax.script.ScriptEngineFactory">
- <provider classname="org.acme.PinkyLanguage"/>
- <provider classname="org.acme.BrainLanguage"/>
- </service>
-</jar>
-</pre>
+ <fileset dir="classes"/>
+ <service type="javax.script.ScriptEngineFactory">
+ <provider classname="org.acme.PinkyLanguage"/>
+ <provider classname="org.acme.BrainLanguage"/>
+ </service>
+</jar></pre>
<h4 id="jep238-example">JEP 238 example: a Multi-Release JAR Files</h4>
-<p>
- Here we want to create a <i>Multi-Release JAR File</i> according the specification
- <a target="_blank" href="http://openjdk.java.net/jeps/238">JEP 238</a>.
- It defines on top of a JAR the possibility to place additional or overwriting classes
- in a jar, which are available according to the Java version you run.<br>
- Basically it says, that you have to set the manifest entry <tt>Multi-Release: true</tt>
- and place all additional or overwriting classes in
- <tt>META-INF/versions/<i>number</i>/package-structure</tt>, e.g.
- <tt>META-INF/versions/9/org/apache/ant/MyClass.class</tt>
-</p>
-<p>
- In this example we expect that the normal classes are compiled into
- <code>${java.classes}</code> and the Java 9 classes are compiled into
- <code>${java9.classes}</code>.
-</p>
+<p>Here we want to create a <em>Multi-Release JAR File</em> according the
+specification <a target="_blank" href="http://openjdk.java.net/jeps/238">JEP 238</a>. It defines on
+top of a JAR the possibility to place additional or overwriting classes in a jar, which are
+available according to the Java version you run.<br> Basically it says, that you have to set the
+manifest entry <code>Multi-Release: true</code> and place all additional or overwriting classes
+in <samp>META-INF/versions/<i>number</i>/package-structure</samp>,
+e.g. <samp>META-INF/versions/9/org/apache/ant/MyClass.class</samp></p>
+<p>In this example we expect that the normal classes are compiled into <samp>${java.classes}</samp>
+and the Java 9 classes are compiled into <samp>${java9.classes}</samp>.</p>
<pre>
- <jar destfile="mrjar.jar">
- <manifest>
+<jar destfile="mrjar.jar">
+ <manifest>
<!-- special mf-entry according to the spec -->
<attribute name="Multi-Release" value="true"/>
- </manifest>
- <!-- directory structure according to the spec ... -->
- <!-- ... default classes loadable by old (<Java 9) versions -->
- <fileset dir="${java.classes}"/>
- <!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader -->
- <zipfileset prefix="META-INF/versions/9/" dir="${java9.classes}"/>
- </jar>
-</pre>
+ </manifest>
+ <!-- directory structure according to the spec ... -->
+ <!-- ... default classes loadable by old (<Java 9) versions -->
+ <fileset dir="${java.classes}"/>
+ <!-- ... per release classes, require Java 9+ for loadable via standard ClassLoader -->
+ <zipfileset prefix="META-INF/versions/9/" dir="${java9.classes}"/>
+</jar></pre>
</body>
</html>
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/jarlib-available.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/jarlib-available.html b/manual/Tasks/jarlib-available.html
index c240887..5efd196 100644
--- a/manual/Tasks/jarlib-available.html
+++ b/manual/Tasks/jarlib-available.html
@@ -26,106 +26,98 @@
<h2 id="jarlib-available">jarlib-available</h2>
<h3>Description</h3>
-<p>Check whether an extension is present in a fileset or an extensionSet.
+<p>Check whether an extension is present in a <code>fileset</code> or an <code>extensionSet</code>.
If the extension is present then a property is set.</p>
-<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> in the documentation bundle for your
-Java Standard Edition package, in file
-<code>guide/extensions/versioning.html</code> or the online
-<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/extensions/versioning.html">
-Extension and ExtensionSet documentation</a> for further details</p>
+<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>
+in the documentation bundle for your Java Standard Edition package, in file
+<samp>guide/extensions/versioning.html</samp> or the online <a target="_blank"
+href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"> Extension
+and ExtensionSet documentation</a> for further details.</p>
<h3>Parameters</h3>
-<table>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">property</td>
- <td valign="top">The name of property to set if extensions is available.</td>
- <td valign="top" align="center">Yes</td>
+ <td>property</td>
+ <td>The name of property to set if extensions is available</td>
+ <td>Yes</td>
</tr>
<tr>
- <td valign="top">file</td>
- <td valign="top">The file to check for extension</td>
- <td valign="top" align="center">Yes, unless a nested
- extensionSet or fileset is specified</td>
+ <td>file</td>
+ <td>The file to check for extension</td>
+ <td>Yes, unless a nested
+ <code><extensionSet></code> or <code><fileset></code> is specified</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>extension</h4>
- <p><a href="../Types/extension.html">Extension</a> the extension
- to search for.</p>
+<p><a href="../Types/extension.html">Extension</a> the extension to search for.</p>
<h4>fileset</h4>
- <p><a href="../Types/fileset.html">FileSet</a>s are used to select
-sets of files to check for extension.</p>
+<p><a href="../Types/fileset.html">FileSet</a>s are used to select sets of files to check for
+extension.</p>
<h4>extensionSet</h4>
- <p><a href="../Types/extensionset.html">ExtensionSet</a>s is the set
- of extensions to search for extension in.</p>
+<p><a href="../Types/extensionset.html">ExtensionSet</a>s is the set of extensions to search for
+extension in.</p>
<h3>Examples</h3>
-<p><b>Search for extension in single file</b></p>
+<p><strong>Search for extension in single file</strong></p>
<pre>
- <jarlib-available property="myext.present" file="myfile.jar">
- <extension
- extensionName="org.apache.tools.ant"
- specificationVersion="1.4.9"
- specificationVendor="Apache Software Foundation"/>
- </jarlib-available>
+<jarlib-available property="myext.present" file="myfile.jar">
+ <extension extensionName="org.apache.tools.ant"
+ specificationVersion="1.4.9"
+ specificationVendor="Apache Software Foundation"/>
+</jarlib-available>
</pre>
-<p><b>Search for extension in single file referencing external Extension</b></p>
+<p><strong>Search for extension in single file referencing external Extension</strong></p>
<pre>
- <extension id="myext"
- extensionName="org.apache.tools.ant"
- specificationVersion="1.4.9"
- specificationVendor="Apache Software Foundation"/>
-
- <jarlib-available property="myext.present" file="myfile.jar">
- <extension refid="myext"/>
- </jarlib-available>
-</pre>
-<p><b>Search for extension in fileset</b></p>
+<extension id="myext"
+ extensionName="org.apache.tools.ant"
+ specificationVersion="1.4.9"
+ specificationVendor="Apache Software Foundation"/>
+
+<jarlib-available property="myext.present" file="myfile.jar">
+ <extension refid="myext"/>
+</jarlib-available></pre>
+<p><strong>Search for extension in fileset</strong></p>
<pre>
- <extension id="myext"
- extensionName="org.apache.tools.ant"
- specificationVersion="1.4.9"
- specificationVendor="Apache Software Foundation"/>
-
- <jarlib-available property="myext.present">
- <extension refid="myext"/>
- <fileset dir="lib">
- <include name="*.jar"/>
- </fileset>
- </jarlib-available>
-</pre>
-<p><b>Search for extension in extensionSet</b></p>
+<extension id="myext"
+ extensionName="org.apache.tools.ant"
+ specificationVersion="1.4.9"
+ specificationVendor="Apache Software Foundation"/>
+
+<jarlib-available property="myext.present">
+ <extension refid="myext"/>
+ <fileset dir="lib">
+ <include name="*.jar"/>
+ </fileset>
+</jarlib-available></pre>
+<p><strong>Search for extension in extensionSet</strong></p>
<pre>
- <extension id="myext"
- extensionName="org.apache.tools.ant"
- specificationVersion="1.4.9"
- specificationVendor="Apache Software Foundation"/>
-
- <jarlib-available property="myext.present">
- <extension refid="myext"/>
- <extensionSet id="exts3">
- <libfileset
- includeUrl="false"
- includeImpl="true"
- dir="lib">
- <include name="*.jar"/>
- </libfileset>
- </extensionSet>
- </jarlib-available>
-</pre>
+<extension id="myext"
+ extensionName="org.apache.tools.ant"
+ specificationVersion="1.4.9"
+ specificationVendor="Apache Software Foundation"/>
+
+<jarlib-available property="myext.present">
+ <extension refid="myext"/>
+ <extensionSet id="exts3">
+ <libfileset includeUrl="false"
+ includeImpl="true"
+ dir="lib">
+ <include name="*.jar"/>
+ </libfileset>
+ </extensionSet>
+</jarlib-available></pre>
</body>
</html>
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/jarlib-display.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/jarlib-display.html b/manual/Tasks/jarlib-display.html
index 7f4b81e..2da3ba5 100644
--- a/manual/Tasks/jarlib-display.html
+++ b/manual/Tasks/jarlib-display.html
@@ -26,51 +26,46 @@
<h2 id="jarlib-display">jarlib-display</h2>
<h3>Description</h3>
-<p>Display the "Optional Package" and "Package Specification" information
- contained within the specified jars.</p>
+<p>Display the "Optional Package" and "Package Specification" information contained within the
+specified jars.</p>
-<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> in the documentation bundle for your
-Java Standard Edition package, in file
-<code>guide/extensions/versioning.html</code> or the online
-<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/extensions/versioning.html">
-Extension and ExtensionSet documentation</a> for further details</p>
+<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>
+in the documentation bundle for your Java Standard Edition package, in file
+<samp>guide/extensions/versioning.html</samp> or the online <a target="_blank"
+href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"> Extension
+and ExtensionSet documentation</a> for further details.</p>
<h3>Parameters</h3>
-<table>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">file</td>
- <td valign="top">The file to display extension information about.</td>
- <td valign="top" align="center">Yes, unless a nested fileset is specified</td>
+ <td>file</td>
+ <td>The file to display extension information about</td>
+ <td>Yes, unless a nested <code><fileset></code> is specified</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>fileset</h4>
- <p><a href="../Types/fileset.html">FileSet</a>s contain list of files to
- display Extension information about.</p>
+<p><a href="../Types/fileset.html">FileSet</a>s contain list of files to display Extension
+information about.</p>
<h3>Examples</h3>
-<p><b>Display Extension info for a single file</b></p>
-<pre>
- <jarlib-display file="myfile.jar">
-</pre>
+<p><strong>Display Extension info for a single file</strong></p>
+<pre><jarlib-display file="myfile.jar"></pre>
-<p><b>Display Extension info for a fileset</b></p>
+<p><strong>Display Extension info for a fileset</strong></p>
<pre>
- <jarlib-display>
- <fileset dir="lib">
- <include name="*.jar"/>
- </fileset>
- </jarlib-display>
-</pre>
+<jarlib-display>
+ <fileset dir="lib">
+ <include name="*.jar"/>
+ </fileset>
+</jarlib-display></pre>
</body>
</html>
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/jarlib-manifest.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/jarlib-manifest.html b/manual/Tasks/jarlib-manifest.html
index e2f5bda..7811784 100644
--- a/manual/Tasks/jarlib-manifest.html
+++ b/manual/Tasks/jarlib-manifest.html
@@ -26,76 +26,69 @@
<h2 id="jarlib-manifest">jarlib-manifest</h2>
<h3>Description</h3>
-<p>Task to generate a manifest that declares all the dependencies
- in manifest. The dependencies are determined by looking in the
- specified path and searching for Extension / "Optional Package"
- specifications in the manifests of the jars.</p>
-
-<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> in the documentation bundle for your
-Java Standard Edition package, in file
-<code>guide/extensions/versioning.html</code> or the online
-<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/extensions/versioning.html">
-Extension and ExtensionSet documentation</a> for further details</p>
+<p>Task to generate a manifest that declares all the dependencies in manifest. The dependencies are
+determined by looking in the specified path and searching for Extension / "Optional Package"
+specifications in the manifests of the jars.</p>
+
+<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>
+in the documentation bundle for your Java Standard Edition package, in file
+<code>guide/extensions/versioning.html</code> or the online <a target="_blank"
+href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html">Extension
+and ExtensionSet documentation</a> for further details.</p>
<h3>Parameters</h3>
-<table>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">destfile</td>
- <td valign="top">The file to generate Manifest into</td>
- <td valign="top" align="center">Yes.</td>
+ <td>destfile</td>
+ <td>The file to generate Manifest into</td>
+ <td>Yes</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>extension</h4>
- <p><a href="../Types/extension.html">Extension</a> the extension
- that this library implements.</p>
+<p><a href="../Types/extension.html">Extension</a> the extension that this library implements.</p>
<h4>depends</h4>
- <p><a href="../Types/extensionset.html">ExtensionSet</a>s containing
- all dependencies for jar.</p>
+<p><a href="../Types/extensionset.html">ExtensionSet</a>s containing all dependencies for jar.</p>
<h4>options</h4>
- <p><a href="../Types/extensionset.html">ExtensionSet</a>s containing
- all optional dependencies for jar. (Optional dependencies will be used if
- present else they will be ignored)</p>
+<p><a href="../Types/extensionset.html">ExtensionSet</a>s containing all optional dependencies for
+jar. (Optional dependencies will be used if present else they will be ignored)</p>
<h3>Examples</h3>
-<p><b>Basic Manifest generated for single Extension</b></p>
+<p><strong>Basic Manifest generated for single Extension</strong></p>
<pre>
<extension id="e1"
- extensionName="MyExtensions"
- specificationVersion="1.0"
- specificationVendor="Peter Donald"
- implementationVendorID="vv"
- implementationVendor="Apache"
- implementationVersion="2.0"
- implementationURL="http://somewhere.com"/>
+ extensionName="MyExtensions"
+ specificationVersion="1.0"
+ specificationVendor="Peter Donald"
+ implementationVendorID="vv"
+ implementationVendor="Apache"
+ implementationVersion="2.0"
+ implementationURL="http://somewhere.com"/>
<jarlib-manifest destfile="myManifest.txt">
<extension refid="e1"/>
-</jarlib-manifest>
-</pre>
+</jarlib-manifest></pre>
-<p><b>Search for extension in fileset</b></p>
-<p><b>A large example with required and optional dependencies</b></p>
+<p><strong>Search for extension in fileset</strong></p>
+<p><strong>A large example with required and optional dependencies</strong></p>
<pre>
<extension id="e1"
- extensionName="MyExtensions"
- specificationVersion="1.0"
- specificationVendor="Peter Donald"
- implementationVendorID="vv"
- implementationVendor="Apache"
- implementationVersion="2.0"
- implementationURL="http://somewhere.com"/>
+ extensionName="MyExtensions"
+ specificationVersion="1.0"
+ specificationVendor="Peter Donald"
+ implementationVendorID="vv"
+ implementationVendor="Apache"
+ implementationVersion="2.0"
+ implementationURL="http://somewhere.com"/>
<extensionSet id="option.ext">
<libfileset dir="lib/option">
@@ -113,8 +106,7 @@ Extension and ExtensionSet documentation</a> for further details</p>
<extension refid="e1"/>
<depends refid="depends.ext"/>
<options refid="option.ext"/>
-</jarlib-manifest>
-</pre>
+</jarlib-manifest></pre>
</body>
</html>
http://git-wip-us.apache.org/repos/asf/ant/blob/66b52f99/manual/Tasks/jarlib-resolve.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/jarlib-resolve.html b/manual/Tasks/jarlib-resolve.html
index 2bb2e78..6cf3e19 100644
--- a/manual/Tasks/jarlib-resolve.html
+++ b/manual/Tasks/jarlib-resolve.html
@@ -26,180 +26,171 @@
<h2 id="jarlib-resolve">jarlib-resolve</h2>
<h3>Description</h3>
-<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 extension. Each resolver will be attempted
- in specified order until library is found or no resolvers are left.
- If no resolvers are left and failOnError is true then a BuildException
- will be thrown.</p>
-
-<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> in the documentation bundle for your
-Java Standard Edition package, in file
-<code>guide/extensions/versioning.html</code> or the online
-<a target="_blank" href="http://docs.oracle.com/javase/7/docs/technotes/guides/extensions/versioning.html">
-Extension and ExtensionSet documentation</a> for further details</p>
+<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
+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>
+
+<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>
+in the documentation bundle for your Java Standard Edition package, in file
+<code>guide/extensions/versioning.html</code> or the online <a target="_blank"
+href="https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html"> Extension
+and ExtensionSet documentation</a> for further details.</p>
<h3>Parameters</h3>
-<table>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">property</td>
- <td valign="top">The name of property to set to library location.</td>
- <td valign="top" align="center">Yes</td>
+ <td>property</td>
+ <td>The name of property to set to library location.</td>
+ <td>Yes</td>
</tr>
<tr>
- <td valign="top">failOnError</td>
- <td valign="top">True if failure to locate library should result in build exception.</td>
- <td valign="top" align="center">No, defaults to true.</td>
+ <td>failOnError</td>
+ <td><q>true</q> if failure to locate library should result in build exception.</td>
+ <td>No; defaults to <q>true</q></td>
</tr>
<tr>
- <td valign="top">checkExtension</td>
- <td valign="top">True if libraries returned by nested resolvers should be checked to see if
- they supply extension.</td>
- <td valign="top" align="center">No, defaults to true.</td>
+ <td>checkExtension</td>
+ <td><q>true</q> if libraries returned by nested resolvers should be checked to see if they
+ supply extension.</td>
+ <td>No; defaults to <q>true</q></td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>extension</h4>
- <p><a href="../Types/extension.html">Extension</a> the extension
- to resolve. Must be present</p>
+<p><a href="../Types/extension.html">Extension</a> the extension to resolve. Must be present</p>
<h4>location</h4>
- <p>The location sub element allows you to look for a library in a
- location relative to project directory.</p>
-<table>
+<p>The <code>location</code> nested element allows you to look for a library in a location relative
+to project directory.</p>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">location</td>
- <td valign="top">The pathname of library.</td>
- <td valign="top" align="center">Yes</td>
+ <td>location</td>
+ <td>The pathname of library.</td>
+ <td>Yes</td>
</tr>
</table>
<h4>url</h4>
- <p>The url resolver allows you to download a library from a URL to a
- local file.</p>
-<table>
+<p>The <code>url</code> resolver allows you to download a library from a URL to a local file.</p>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">url</td>
- <td valign="top">The URL to download.</td>
- <td valign="top" align="center">Yes</td>
+ <td>url</td>
+ <td>The URL to download.</td>
+ <td>Yes</td>
</tr>
<tr>
- <td valign="top">destfile</td>
- <td valign="top">The file to download URL into.</td>
- <td valign="top" align="center" rowspan="2">Exactly one of the two</td>
+ <td>destfile</td>
+ <td>The file to download URL into.</td>
+ <td rowspan="2">Exactly one of the two</td>
</tr>
<tr>
- <td valign="top">destdir</td>
- <td valign="top">The directory in which to place downloaded file.</td>
+ <td>destdir</td>
+ <td>The directory in which to place downloaded file.</td>
</tr>
</table>
<h4>ant</h4>
- <p>The ant resolver allows you to run an Apache Ant build file to generate a library.</p>
-<table>
+<p>The <code>ant</code> resolver allows you to run an Apache Ant build file to generate a
+library.</p>
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
<tr>
- <td valign="top">antfile</td>
- <td valign="top">The build file.</td>
- <td valign="top" align="center">Yes</td>
+ <td>antfile</td>
+ <td>The build file.</td>
+ <td>Yes</td>
</tr>
<tr>
- <td valign="top">destfile</td>
- <td valign="top">The file that the ant build creates.</td>
- <td valign="top" align="center">Yes</td>
+ <td>destfile</td>
+ <td>The file that the ant build creates.</td>
+ <td>Yes</td>
</tr>
<tr>
- <td valign="top">target</td>
- <td valign="top">The target to run in build file.</td>
- <td valign="top" align="center">No</td>
+ <td>target</td>
+ <td>The target to run in build file.</td>
+ <td>No</td>
</tr>
</table>
<h3>Examples</h3>
-<p><b>Resolve Extension to file.</b> If file does not exist or file
- does not implement extension then throw an exception.</p>
+<p><strong>Resolve Extension to file.</strong> If file does not exist or file does not implement
+extension then throw an exception.</p>
<pre>
- <extension id="dve.ext"
- extensionName="org.realityforge.dve"
- specificationVersion="1.2"
- specificationVendor="Peter Donald"/>
-
- <jarlib-resolve property="dve.library">
- <extension refid="dve.ext"/>
- <location location="/opt/jars/dve.jar"/>
- </jarlib-resolve>
-</pre>
-
-<p><b>Resolve Extension to url.</b> If url does not exist or can not write
- to destfile or files does not implement extension then throw an exception.</p>
+<extension id="dve.ext"
+ extensionName="org.realityforge.dve"
+ specificationVersion="1.2"
+ specificationVendor="Peter Donald"/>
+
+<jarlib-resolve property="dve.library">
+ <extension refid="dve.ext"/>
+ <location location="/opt/jars/dve.jar"/>
+</jarlib-resolve></pre>
+
+<p><strong>Resolve Extension to URL.</strong> If URL does not exist or can not write
+to <var>destfile</var> or file does not implement extension then throw an exception.</p>
<pre>
- <extension id="dve.ext"
- extensionName="org.realityforge.dve"
- specificationVersion="1.2"
- specificationVendor="Peter Donald"/>
-
- <jarlib-resolve property="dve.library">
- <extension refid="dve.ext"/>
- <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
- </jarlib-resolve>
-</pre>
-
-<p><b>Resolve Extension to file produce by ant build.</b> If file does not get produced
- or ant file is missing or build fails then throw an exception (Note does not check
- that library implements extension).</p>
+<extension id="dve.ext"
+ extensionName="org.realityforge.dve"
+ specificationVersion="1.2"
+ specificationVendor="Peter Donald"/>
+
+<jarlib-resolve property="dve.library">
+ <extension refid="dve.ext"/>
+ <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
+</jarlib-resolve></pre>
+
+<p><strong>Resolve Extension to file produce by Ant build.</strong> If file does not get produced or
+Ant file is missing or build fails then throw an exception. (<strong>Note</strong>: does not check
+that library implements extension.)</p>
<pre>
- <extension id="dve.ext"
- extensionName="org.realityforge.dve"
- specificationVersion="1.2"
- specificationVendor="Peter Donald"/>
-
- <jarlib-resolve property="dve.library" checkExtension="false">
- <extension refid="dve.ext"/>
- <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
- </jarlib-resolve>
-</pre>
-
-<p><b>Resolve Extension via multiple methods.</b> First check local file to see if it implements
- extension. If it does not then try to build it from source in parallel directory. If that
- fails then finally try to download it from a website. If all steps fail then throw a build
- exception.</p>
+<extension id="dve.ext"
+ extensionName="org.realityforge.dve"
+ specificationVersion="1.2"
+ specificationVendor="Peter Donald"/>
+
+<jarlib-resolve property="dve.library" checkExtension="false">
+ <extension refid="dve.ext"/>
+ <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
+</jarlib-resolve></pre>
+
+<p><strong>Resolve Extension via multiple methods.</strong> First check local file to see if it
+implements extension. If it does not then try to build it from source in parallel directory. If that
+fails then finally try to download it from a website. If all steps fail then throw a build
+exception.</p>
<pre>
- <extension id="dve.ext"
- extensionName="org.realityforge.dve"
- specificationVersion="1.2"
- specificationVendor="Peter Donald"/>
-
- <jarlib-resolve property="dve.library">
- <extension refid="dve.ext"/>
- <location location="/opt/jars/dve.jar"/>
- <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
- <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
- </jarlib-resolve>
-</pre>
+<extension id="dve.ext"
+ extensionName="org.realityforge.dve"
+ specificationVersion="1.2"
+ specificationVendor="Peter Donald"/>
+
+<jarlib-resolve property="dve.library">
+ <extension refid="dve.ext"/>
+ <location location="/opt/jars/dve.jar"/>
+ <ant antfile="../dve/build.xml" target="main" destfile="lib/dve.jar"/>
+ <url url="http://www.realityforge.net/jars/dve.jar" destfile="lib/dve.jar"/>
+</jarlib-resolve></pre>
</body>
</html>