You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2022/03/22 20:31:15 UTC

[ant] branch master updated (a42d789 -> 7ab1222)

This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git.


    from a42d789  @since
     add c6854c5  document modificationtime attribute of zip added many moons ago
     new 7ab1222  Merge branch '1.9.x'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 manual/Tasks/ear.html | 10 ++++++++++
 manual/Tasks/jar.html | 10 ++++++++++
 manual/Tasks/war.html | 10 ++++++++++
 manual/Tasks/zip.html | 10 ++++++++++
 4 files changed, 40 insertions(+)

[ant] 01/01: Merge branch '1.9.x'

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git

commit 7ab122252c0c26284a8801e45785c5b1f4f6295f
Merge: a42d789 c6854c5
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Tue Mar 22 21:23:45 2022 +0100

    Merge branch '1.9.x'

 manual/Tasks/ear.html | 10 ++++++++++
 manual/Tasks/jar.html | 10 ++++++++++
 manual/Tasks/war.html | 10 ++++++++++
 manual/Tasks/zip.html | 10 ++++++++++
 4 files changed, 40 insertions(+)

diff --cc manual/Tasks/ear.html
index 9afc071,631d83a..081c752
--- a/manual/Tasks/ear.html
+++ b/manual/Tasks/ear.html
@@@ -24,243 -24,286 +24,253 @@@
  
  <body>
  
 -<h2><a name="ear">Ear</a></h2>
 +<h2 id="ear">Ear</h2>
  <h3>Description</h3>
 -<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>&quot;add&quot;</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>
  
  <h3>Parameters</h3>
 -<table border="1" cellpadding="2" cellspacing="0">
 +<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 scope="col">Attribute</th>
 +    <th scope="col">Description</th>
 +    <th scope="col">Required</th>
    </tr>
    <tr>
 -    <td valign="top">destfile</td>
 -    <td valign="top">the EAR file to create.</td>
 -    <td valign="top" align="center">Yes</td>
 +    <td>destfile</td>
 +    <td>the EAR file to create.</td>
 +    <td>Yes</td>
    </tr>
    <tr>
 -    <td valign="top">appxml</td>
 -    <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 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
 -      (&quot;yes&quot;/&quot;no&quot;). 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 &quot;skip&quot;, &quot;merge&quot;, and &quot;mergewithoutmain&quot;.  &quot;merge&quot; will merge all of the manifests together, and merge this into any other specified manifests.  &quot;mergewithoutmain&quot; merges everything but the Main section of the manifests.  Default value is &quot;skip&quot;.
 -    </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 &quot;fail&quot;, &quot;skip&quot;, and &quot;create&quot;.  Default is &quot;create&quot;.</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>
    </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="jar.html#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>
 +    <td>index</td>
 +    <td>whether to create
 +      an <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JAR_Index"
 +      target="_top">index list</a> to speed up classloading.  Unless you specify additional jars with
 +      nested <a href="jar.html#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 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/>
 -      Oracle'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.<br/>
 -      <em>Ant 1.8.0</em> - Defaults to false.</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" target="_top">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 &quot;false&quot;.</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 &quot;add&quot;, &quot;preserve&quot;, and &quot;fail&quot;.  The default value is &quot;add&quot;.  </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>
+   <tr>
+     <td valign="top">modificationtime</td>
+     <td valign="top">Set all stored file modification times to the
+     given time. This can either be a number interpreted as
+     milliseconds since 1970-01-01T00:00:00Z or a string that can be
+     parsed as a ISO 8601 timestamp with optional timezone.
 -      <em>Since Ant 1.9.10</em>.
++      <em>Since Ant 1.10.2</em>.
+     </td>
+     <td align="center" valign="top">No</td>
+   </tr>
  </table>
  
 -<h3>Nested elements</h3>
 +<h3>Parameters specified as 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">&lt;jar&gt;</a>
 +<p>These are inherited from <a href="jar.html">&lt;jar&gt;</a></p>
  
 -<h2>Example</h2>
 +<h3>Example</h3>
  <pre>
 -    &lt;ear destfile=&quot;${build.dir}/myapp.ear&quot; appxml=&quot;${src.dir}/metadata/application.xml&quot;&gt;
 -      &lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;*.jar,*.war&quot;/&gt;
 -    &lt;/ear&gt;
 -</pre>
 -
 +&lt;ear destfile=&quot;${build.dir}/myapp.ear&quot; appxml=&quot;${src.dir}/metadata/application.xml&quot;&gt;
 +  &lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;*.jar,*.war&quot;/&gt;
 +&lt;/ear&gt;</pre>
  
  </body>
  </html>
diff --cc manual/Tasks/jar.html
index 555dab9,f911967..517de8c
--- a/manual/Tasks/jar.html
+++ b/manual/Tasks/jar.html
@@@ -24,375 -24,428 +24,385 @@@
  
  <body>
  
 -<h2><a name="jar">Jar</a></h2>
 +<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
 -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>&lt;fileset&gt;</code>
 -(<code>dir</code> becomes <code>basedir</code>) as well as the nested
 -<code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
 -<code>&lt;patternset&gt;</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>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
 -being wrapped and continued on the next line.</p>
 +<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>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">
 -versioning specification</a>.</p>
 +<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
 +attributes of <code>&lt;fileset&gt;</code> (<var>dir</var> becomes <var>basedir</var>) as well as
 +the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
 +and <code>&lt;patternset&gt;</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><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>If the manifest is omitted, a simple one will be supplied by Apache Ant.</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>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 href="https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html" target="_top">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 <code>Jar</code> task checks whether you specified package information according to
 +the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp90779"
 +target="_top">versioning specification</a>.</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>For creating a simple version of a <a href="https://openjdk.java.net/jeps/238" target="_top">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 border="1" cellpadding="2" cellspacing="0">
 +<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 scope="col">Attribute</th>
 +    <th scope="col">Description</th>
 +    <th scope="col">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 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
 -      (&quot;yes&quot;/&quot;no&quot;). 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 &quot;skip&quot;, &quot;merge&quot;, and &quot;mergewithoutmain&quot;.  &quot;merge&quot; will merge all of the manifests together, and merge this into any other specified manifests.  &quot;mergewithoutmain&quot; merges everything but the Main section of the manifests.  Default value is &quot;skip&quot;.
 +    <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 &quot;false&quot;.</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 &quot;fail&quot;, &quot;skip&quot;, and &quot;create&quot;.  Default is &quot;create&quot;.</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 &quot;add&quot;, &quot;preserve&quot;, and &quot;fail&quot;.  The default value is &quot;add&quot;.  </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.<br/>
 -      <em>Ant 1.8.0</em> - Defaults to false.</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>
 +    <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 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>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"
 +      target="_top">index list</a> to speed up classloading.
 +      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" target="_top">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>
+   <tr>
+     <td valign="top">modificationtime</td>
+     <td valign="top">Set all stored file modification times to the
+     given time. This can either be a number interpreted as
+     milliseconds since 1970-01-01T00:00:00Z or a string that can be
+     parsed as a ISO 8601 timestamp with optional timezone.
 -      <em>Since Ant 1.9.10</em>.
++      <em>Since Ant 1.10.2</em>.
+     </td>
+     <td align="center" valign="top">No</td>
+   </tr>
  </table>
  
 -<h3>Nested elements</h3>
 +<h3>Parameters specified as 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>
 -
 -<a name="indexjars"><h4>indexjars</h4></a>
 -
 -<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 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>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 <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>
  <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="indexjarsmapper">indexjarsmapper</h4>
 +
 +<p><em>Since Ant 1.10.9</em></p>
 +
 +<p>The nested <code>indexjarsmapper</code> element can be used to perform custom filename
 +transformations for the archives specified by <code>indexjars</code> if the
 +<a href="#indexjars">default filename transformation</a> doesn't suffice.
  
 -<a name="service"><h4>service</h4></a>
 +<h4 id="service">service</h4>
  
 -<p><em>since ant 1.7.0</em></p>
 +<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).
 +<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"
 +target="_top">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>
  
 -  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 border="1" cellpadding="2" cellspacing="0">
 +<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>
 -    <td valign="top"><b>Attribute</b></td>
 -    <td valign="top"><b>Description</b></td>
 -    <td align="center" valign="top"><b>Required</b></td>
 +    <th scope="col">Attribute</th>
 +    <th scope="col">Description</th>
 +    <th scope="col">Required</th>
    </tr>
    <tr>
 -    <td valign="top">type</td>
 -    <td valign="top">The name of the service.</td>
 -    <td valign="top" align="center">Yes</td>
 +    <td>type</td>
 +    <td>The name of the service.</td>
 +    <td>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>&lt;provider&gt;</code> element.</td>
 +    <td>provider</td>
 +    <td>The classname of the class implementing the service.</td>
 +    <td>Yes, unless there is a nested <code>&lt;provider&gt;</code> element.</td>
    </tr>
  </table>
 -  <p>
 -    The provider classname is specified either by the "provider" attribute, or
 -    by a nested &lt;provider&gt; element, which has a single "classname" attribute.
 -    If a JAR file has more that one implementation of the service, a number of
 -    nested &lt;provider&gt; elements may be used.
 -  </p>
 -  
 -  
 +<p>The provider classname is specified either by the <var>provider</var> attribute, or by a
 +nested <code>&lt;provider&gt;</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>&lt;provider&gt;</code> elements may be used.</p>
 +
  <h3>Examples</h3>
  
  <h4>Simple</h4>
diff --cc manual/Tasks/war.html
index e8bb71f,b3c9096..6357501
--- a/manual/Tasks/war.html
+++ b/manual/Tasks/war.html
@@@ -24,248 -24,295 +24,258 @@@
  
  <body>
  
 -<h2><a name="war">War</a></h2>
 +<h2 id="war">War</h2>
  <h3>Description</h3>
 -<p>An extension of the <a href="jar.html">Jar</a> task with special
 -treatment for files that should end up in the
 -<code>WEB-INF/lib</code>, <code>WEB-INF/classes</code> or
 -<code>WEB-INF</code> directories of the Web Application Archive.</p>
 -<p>(The War task is a shortcut for specifying the particular layout of a WAR 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 War task. The task is also resource-enabled
 -    and will add nested resources and resource collections to the archive.</p>
 +<p>An extension of the <a href="jar.html">Jar</a> task with special treatment for files that should
 +end up in the <samp>WEB-INF/lib</samp>, <samp>WEB-INF/classes</samp> or <samp>WEB-INF</samp>
 +directories of the Web Application Archive.</p>
  
 -<p>
 -    Before Servlet API 2.5/Java EE 5, a WEB-INF/web.xml file was mandatory in a
 -    WAR file, so this task failed if the <code>webxml</code> attribute was missing.
 -    As the web.xml file is now optional, the <code>webxml</code> attribute may now
 -    be made optional. However, as most real web applications do need a web.xml file,
 -    it is not optional by default. The task will fail if the file is not
 -    included, unless the <code>needxmlfile</code> attribute
 -    is set to <code>false</code>. The task
 -    will warn if more than one web.xml file is added to the JAR  
 -    through the filesets.
 -</p>
 +<p>(The <code>War</code> task is a shortcut for specifying the particular layout of a WAR file.  The
 +same thing can be accomplished by using the <var>prefix</var> and <var>fullpath</var> attributes
 +of <code>zipfileset</code>s in a <code>Zip</code> or <code>Jar</code> task.)</p>
 +<p>The extended <code>zipfileset</code> element from the <code>zip</code> task (with
 +attributes <var>prefix</var>, <var>fullpath</var>, and <var>src</var>) is available in
 +the <code>War</code> task. The task is also resource-enabled and will add nested resources and
 +resource collections to the archive.</p>
  
 +<p>Before Servlet API 2.5/Java EE 5, a <samp>WEB-INF/web.xml</samp> file was mandatory in a WAR
 +file, so this task failed if the <var>webxml</var> attribute was missing.  As
 +the <samp>web.xml</samp> file is now optional, the <var>webxml</var> attribute may now be made
 +optional. However, as most real web applications do need a <samp>web.xml</samp> file, it is not
 +optional by default. The task will fail if the file is not included, unless
 +the <var>needxmlfile</var> attribute is set to <q>false</q>. The task will warn if more than
 +one <samp>web.xml</samp> file is added to the JAR through the filesets.</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>&quot;add&quot;</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>
  
  <h3>Parameters</h3>
 -<table border="1" cellpadding="2" cellspacing="0">
 +<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 scope="col">Attribute</th>
 +    <th scope="col">Description</th>
 +    <th scope="col">Required</th>
    </tr>
    <tr>
 -    <td valign="top">destfile</td>
 -    <td valign="top">the WAR file to create.</td>
 -    <td align="center" valign="top" rowspan="2">Exactly one of the two.</td>
 +    <td>destfile</td>
 +    <td>the WAR file to create.</td>
 +    <td rowspan="2">Exactly one of the two</td>
    </tr>
    <tr>
 -    <td valign="top">warfile</td>
 -    <td valign="top"><i>Deprecated</i> name of the file to create
 -    -use <tt>destfile</tt> instead.</td>
 +    <td>warfile</td>
 +    <td class="left"><em><u>Deprecated</u></em> name of the file to
 +      create&mdash;use <var>destfile</var> instead.</td>
    </tr>
    <tr>
 -    <td valign="top">webxml</td>
 -    <td valign="top">The servlet configuration descriptor to use (WEB-INF/web.xml).</td>
 -    <td valign="top" align="center">Yes, unless <tt>needxmlfile</tt> is true,
 -    the file is pulled in via a nested fileset, or an existing WAR file is
 -    being updated.</td>
 +    <td>webxml</td>
 +    <td>The servlet configuration descriptor to use (<samp>WEB-INF/web.xml</samp>).</td>
 +    <td>Yes, unless <var>needxmlfile</var> is <q>true</q>, the file is pulled in via a nested
 +      fileset, or an existing WAR file is being updated.</td>
    </tr>
    <tr>
 -    <td valign="top">needxmlfile</td>
 -    <td valign="top">Flag to indicate whether or not the web.xml file is needed.
 -        It should be set to false when generating
 -        servlet 2.5+ WAR files without a web.xml file.
 -        <em>Since Apache Ant 1.7</em></td>
 -    <td valign="top" align="center">No -default "true"</td>
 +    <td>needxmlfile</td>
 +    <td>Flag to indicate whether or not the <samp>web.xml</samp> file is needed.  It should be set
 +      to <q>false</q> when generating servlet 2.5+ WAR files without a <samp>web.xml</samp>
 +      file.  <em>Since Apache Ant 1.7</em></td>
 +    <td>No; default is <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 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 <var>zipfileset</var>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
 -      (&quot;yes&quot;/&quot;no&quot;). 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 &quot;skip&quot;, &quot;merge&quot;, and &quot;mergewithoutmain&quot;.  &quot;merge&quot; will merge all of the manifests together, and merge this into any other specified manifests.  &quot;mergewithoutmain&quot; merges everything but the Main section of the manifests.  Default value is &quot;skip&quot;.
 +    <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>
 +    <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 &quot;fail&quot;, &quot;skip&quot;, and &quot;create&quot;.  Default is &quot;create&quot;.</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">update</td>
 -    <td valign="top">indicates whether to update or overwrite
 -      the destination file if it already exists.  Default is &quot;false&quot;.</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; defaults to <q>false</q></td>
    </tr>
    <tr>
 -    <td valign="top">duplicate</td>
 -    <td valign="top">behavior when a duplicate file is found.  Valid values are &quot;add&quot;, &quot;preserve&quot;, and &quot;fail&quot;.  The default value is &quot;add&quot;.  </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; defaults to <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. <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>
 -    <td valign="top" align="center">No, default is false</td>
 +    <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>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 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>
 +    <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>
+   <tr>
+     <td valign="top">modificationtime</td>
+     <td valign="top">Set all stored file modification times to the
+     given time. This can either be a number interpreted as
+     milliseconds since 1970-01-01T00:00:00Z or a string that can be
+     parsed as a ISO 8601 timestamp with optional timezone.
 -      <em>Since Ant 1.9.10</em>.
++      <em>Since Ant 1.10.2</em>.
+     </td>
+     <td align="center" valign="top">No</td>
+   </tr>
  </table>
  
 -<h3>Nested elements</h3>
 +<h3>Parameters specified as nested elements</h3>
  
  <h4>lib</h4>
 -<p>The nested <code>lib</code> element specifies a <a
 -href="../Types/fileset.html">FileSet</a>. All files included in this fileset will
 -end up in the <code>WEB-INF/lib</code> directory of the war file.</p>
 +<p>The nested <code>lib</code> element specifies a <a href="../Types/fileset.html">FileSet</a>. All
 +files included in this fileset will end up in the <samp>WEB-INF/lib</samp> directory of the war
 +file.</p>
  
  <h4>classes</h4>
 -<p>The nested <code>classes</code> element specifies a <a
 -href="../Types/fileset.html">FileSet</a>. All files included in this fileset will
 -end up in the <code>WEB-INF/classes</code> directory of the war file.</p>
 +<p>The nested <code>classes</code> element specifies
 +a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will end up in
 +the <samp>WEB-INF/classes</samp> directory of the war file.</p>
  
  <h4>webinf</h4>
 -<p>The nested <code>webinf</code> element specifies a <a
 -href="../Types/fileset.html">FileSet</a>. All files included in this fileset will
 -end up in the <code>WEB-INF</code> directory of the war file. If this
 -fileset includes a file named <code>web.xml</code>, the file is
 -ignored and you will get a warning.</p>
 +<p>The nested <code>webinf</code> element specifies
 +a <a href="../Types/fileset.html">FileSet</a>. All files included in this fileset will end up in
 +the <samp>WEB-INF</samp> directory of the war file. If this fileset includes a file
 +named <samp>web.xml</samp>, the file is ignored and you will get a warning.</p>
  
  <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 war 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 war 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">&lt;jar&gt;</a>
diff --cc manual/Tasks/zip.html
index d3b1115,3c7d0e0..e24de54
--- a/manual/Tasks/zip.html
+++ b/manual/Tasks/zip.html
@@@ -24,310 -24,366 +24,320 @@@
  
  <body>
  
 -<h2><a name="zip">Zip</a></h2>
 +<h2 id="zip">Zip</h2>
  <h3>Description</h3>
  <p>Creates a zipfile.</p>
 -<p>The <i>basedir</i> attribute is the reference directory from where to zip.</p>
 +<p>The <var>basedir</var> attribute is the reference directory from where to zip.</p>
  <p>Note that file permissions will not be stored in the resulting zipfile.</p>
 -<p>It is possible to refine the set of files that are being zipped. 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
 -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>&lt;fileset&gt;</code>
 -(<code>dir</code> becomes <code>basedir</code>) as well as the nested
 -<code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
 -<code>&lt;patternset&gt;</code> elements.</p>
 -<p>Or, you may place within it nested file sets, or references to file sets.
 -In this case <code>basedir</code> is optional; the implicit file set is <i>only used</i>
 -if <code>basedir</code> is set. You may use any mixture of the implicit file set
 -(with <code>basedir</code> set, and optional attributes like <code>includes</code>
 -and optional subelements like <code>&lt;include&gt;</code>); explicit nested
 -<code>&lt;fileset&gt;</code> elements so long as at least one fileset total is specified. The ZIP file will
 -only reflect the relative paths of files <i>within</i> each fileset. The Zip task and its derivatives know a special form of a fileset named zipfileset that has additional attributes (described below). </p>
 -<p>The Zip task also supports the merging of multiple zip files into the zip file. 
 -This is possible through either the <i>src</i> attribute of any nested filesets 
 -or by using the special nested fileset <i>zipgroupfileset</i>.</p>
 -
 -<p>The <code>update</code> parameter controls what happens if the ZIP
 -file already exists. When set to <code>yes</code>, the ZIP file is
 -updated with the files specified. (New files are added; old files are
 -replaced with the new versions.) When set to <code>no</code> (the
 -default) the ZIP file is overwritten if any of the files that would be
 -added to the archive are newer than the entries inside the archive.
 -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, Apache Ant will not consider it newer.</p>
 -
 -<p>The <code>whenempty</code> parameter controls what happens when no files match.
 -If <code>skip</code> (the default), the ZIP is not created and a warning is issued.
 -If <code>fail</code>, the ZIP is not created and the build is halted with an error.
 -If <code>create</code>, an empty ZIP file (explicitly zero entries) is created,
 -which should be recognized as such by compliant ZIP manipulation tools.</p>
 -<p>This task will now use the platform's default character encoding
 -for filenames - this is consistent with the command line ZIP tools,
 -but causes problems if you try to open them from within Java and your
 -filenames contain non US-ASCII characters. Use the encoding attribute
 -and set it to UTF8 to create zip files that can safely be read by
 -Java.  For a more complete discussion,
 +
 +<p>It is possible to refine the set of files that are being zipped. 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>&lt;fileset&gt;</code> (<var>dir</var> becomes <var>basedir</var>) as well as
 +the nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
 +and <code>&lt;patternset&gt;</code> elements.</p>
 +
 +<p>Or, you may place within it nested file sets, or references to file sets.  In this
 +case <var>basedir</var> is optional; the implicit file set is <em>only used</em>
 +if <var>basedir</var> is set. You may use any mixture of the implicit file set
 +(with <var>basedir</var> set, and optional attributes like <var>includes</var> and optional
 +subelements like <code>&lt;include&gt;</code>); explicit nested <code>&lt;fileset&gt;</code>
 +elements so long as at least one fileset total is specified. The ZIP file will only reflect the
 +relative paths of files <em>within</em> each fileset. The Zip task and its derivatives know a
 +special form of a fileset named <code>zipfileset</code> that has additional attributes (described
 +below).</p>
 +
 +<p>The Zip task also supports the merging of multiple zip files into the zip file.  This is possible
 +through either the <var>src</var> attribute of any nested filesets or by using the special nested
 +fileset <code>zipgroupfileset</code>.</p>
 +
 +<p>The <var>update</var> parameter controls what happens if the ZIP file already exists. When set
 +to <q>yes</q>, the ZIP file is updated with the files specified. (New files are added; old files are
 +replaced with the new versions.) When set to <q>no</q> (the default) the ZIP file is overwritten if
 +any of the files that would be added to the archive are newer than the entries inside the archive.
 +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, Apache Ant will not consider it
 +newer.</p>
 +
 +<p>The <var>whenempty</var> parameter controls what happens when no files match.  If <q>skip</q>
 +(the default), the ZIP is not created and a warning is issued.  If <q>fail</q>, the ZIP is not
 +created and the build is halted with an error.  If <q>create</q>, an empty ZIP file (explicitly zero
 +entries) is created, which should be recognized as such by compliant ZIP manipulation tools.</p>
 +
 +<p>This task will now use default JVM character encoding for filenames&mdash;this is consistent with
 +the command line ZIP tools, but causes problems if you try to open them from within Java and your
 +filenames contain non US-ASCII characters. Use the <var>encoding</var> attribute and set it
 +to <q>UTF8</q> to create zip files that can safely be read by Java.  For a more complete discussion,
  see <a href="#encoding">below</a></p>
  
 -<p>Starting with Ant 1.5.2, <code>&lt;zip&gt;</code> can store Unix permissions
 -inside the archive (see description of the filemode and dirmode
 -attributes for <a href="../Types/zipfileset.html">&lt;zipfileset&gt;</a>).
 -Unfortunately there is no portable way to store these permissions.
 -Ant uses the algorithm used by <a href="http://www.info-zip.org">Info-Zip's</a>
 -implementation of the zip and unzip commands - these are the default
 -versions of zip and unzip for many Unix and Unix-like systems.</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>&quot;add&quot;</code>.</b></p>
 -
 -<p><b>Please also note</b> that different ZIP tools handle timestamps
 -differently when it comes to applying timezone offset calculations of
 -files.  Some ZIP libraries will store the timestamps as they've been
 -read from the filesystem while others will modify the timestamps both
 -when reading and writing the files to make all timestamps use the same
 -timezone.  A ZIP archive created by one library may extract files with
 -"wrong timestamps" when extracted by another library.</p>
 -
 -<p>Ant's ZIP classes use the same algorithm as the InfoZIP tools and
 -zlib (timestamps get adjusted), Windows' "compressed folders" function
 -and WinZIP don't change the timestamps.  This means that using the
 -unzip task on files created by Windows' compressed folders function
 -may create files with timestamps that are "wrong", the same is true if
 -you use Windows' functions to extract an Ant generated ZIP
 -archive.</p>
 +<p><em>Since Ant 1.5.2</em>, <code>&lt;zip&gt;</code> can store Unix permissions inside the archive
 +(see description of the <var>filemode</var> and <var>dirmode</var> attributes
 +for <a href="../Types/zipfileset.html">&lt;zipfileset&gt;</a>).  Unfortunately there is no portable
 +way to store these permissions.  Ant uses the algorithm used by <a href="http://www.info-zip.org"
 +target="_top">Info-Zip's</a> implementation of the <kbd>zip</kbd> and <kbd>unzip</kbd>
 +commands&mdash;these are the default versions of <kbd>zip</kbd> and <kbd>unzip</kbd> for many
 +Unix(-like) systems.</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><strong>Please also note</strong> that different ZIP tools handle timestamps differently when it
 +comes to applying timezone offset calculations of files.  Some ZIP libraries will store the
 +timestamps as they've been read from the filesystem while others will modify the timestamps both
 +when reading and writing the files to make all timestamps use the same timezone.  A ZIP archive
 +created by one library may extract files with "wrong timestamps" when extracted by another
 +library.</p>
 +
 +<p>Ant's ZIP classes use the same algorithm as the InfoZIP tools and zlib (timestamps get adjusted),
 +Windows' "compressed folders" function and WinZIP don't change the timestamps.  This means that
 +using the <code>unzip</code> task on files created by Windows' compressed folders function may
 +create files with timestamps that are "wrong", the same is true if you use Windows' functions to
 +extract an Ant generated ZIP archive.</p>
  
  <h3>Parameters</h3>
 -<table border="1" cellpadding="2" cellspacing="0">
 +<table class="attr">
    <tr>
 -    <td valign="top"><b>Attribute</b></td>
 -    <td valign="top"><b>Description</b></td>
 -    <td valign="top" align="center"><b>Required</b></td>
 +    <th scope="col">Attribute</th>
 +    <th scope="col">Description</th>
 +    <th scope="col">Required</th>
    </tr>
    <tr>
 -    <td valign="top">destfile</td>
 -    <td valign="top">the zip-file to create.</td>
 -    <td align="center" valign="top" rowspan="2">Exactly one of the two.</td>
 +    <td>destfile</td>
 +    <td>the zip file to create.</td>
 +    <td rowspan="2">Exactly one of the two</td>
    </tr>
    <tr>
 -    <td valign="top">zipfile</td>
 -    <td valign="top">the <i>deprecated</i> old name of destfile.</td>
 +    <td>zipfile</td>
 +    <td class="left"><em><u>deprecated</u></em> old name of <var>destfile</var>.</td>
    </tr>
    <tr>
 -    <td valign="top">basedir</td>
 -    <td valign="top">the directory from which to zip the files.</td>
 -    <td align="center" valign="top">No</td>
 +    <td>basedir</td>
 +    <td>the directory from which to zip 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 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 zip file.  For a list of possible values see the <a
 -                href="http://docs.oracle.com/javase/7/docs/technotes/guides/intl/encoding.doc.html">Supported Encodings</a>.<br/>
 -    Defaults to the platform's default character encoding.
 -      <br/>See also the <a href="#encoding">discussion below</a></td>
 -    <td align="center" valign="top">No</td>
 +    <td>encoding</td>
 +    <td>The character encoding to use for filenames inside the zip file.  For a list of possible
 +      values see
 +      the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html"
 +      target="_top">Supported Encodings</a>.</td>
 +    <td>No; defaults to default JVM character encoding</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
 -      (&quot;yes&quot;/&quot;no&quot;). 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">update</td>
 -    <td valign="top">indicates whether to update or overwrite
 -      the destination file if it already exists.  Default is &quot;false&quot;.</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">whenempty</td>
 -    <td valign="top">behavior when no files match.  Valid values are &quot;fail&quot;, &quot;skip&quot;, and &quot;create&quot;.  Default is &quot;skip&quot;.</td>
 -    <td valign="top" align="center">No</td>
 +    <td>whenempty</td>
 +    <td>behavior when no files match.  Valid values are <q>fail</q>, <q>skip</q>,
 +      and <q>create</q>.</td>
 +    <td>No; default is <q>skip</q></td>
    </tr>
    <tr>
 -    <td valign="top">duplicate</td>
 -    <td valign="top">behavior when a duplicate file is found.  Valid values are &quot;add&quot;, &quot;preserve&quot;, and &quot;fail&quot;. The default value is &quot;add&quot;.  </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. <em>Since Ant 1.6.2</em></td>
 +    <td>No; defaults to <q>true</q></td>
    </tr>
    <tr>
 -    <td valign="top">comment</td>
 -    <td valign="top">Comment to store in the archive. <em>Since Ant 1.6.3</em></td>
 -    <td valign="top" align="center">No</td>
 +    <td>comment</td>
 +    <td>Comment to store in the archive. <em>Since Ant 1.6.3</em></td>
 +    <td>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>
 +    <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="#encoding">discussion below</a></td>
 -    <td align="center" valign="top">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="#encoding">discussion below</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="#encoding">discussion below</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="#encoding">discussion below</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="#encoding">discussion below</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="#encoding">discussion below</a></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="#zip64">discussion below</a></td>
 -    <td align="center" valign="top">No, default is "as-needed"</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="#zip64">discussion below</a></td>
 +    <td>No; default is <q>as-needed</q></td>
    </tr>
+   <tr>
+     <td valign="top">modificationtime</td>
+     <td valign="top">Set all stored file modification times to the
+     given time. This can either be a number interpreted as
+     milliseconds since 1970-01-01T00:00:00Z or a string that can be
+     parsed as a ISO 8601 timestamp with optional timezone.
 -      <em>Since Ant 1.9.10</em>.
++      <em>Since Ant 1.10.2</em>.
+     </td>
+     <td align="center" valign="top">No</td>
+   </tr>
  </table>
  
 -<h3><a name="encoding">Encoding of File Names</a></h3>
 -
 -<p>Traditionally the ZIP archive format uses CodePage 437 as encoding
 -  for file name, which is not sufficient for many international
 -  character sets.</p>
 -
 -<p>Over time different archivers have chosen different ways to work
 -  around the limitation - the <code>java.util.zip</code> packages
 -  simply uses UTF-8 as its encoding for example.</p>
 -
 -<p>Ant has been offering the encoding attribute of the zip and unzip
 -  task as a way to explicitly specify the encoding to use (or expect)
 -  since Ant 1.4.  It defaults to the platform's default encoding for
 -  zip and UTF-8 for jar and other jar-like tasks (war, ear, ...) as
 -  well as the unzip family of tasks.</p>
 -
 -<p>More recent versions of the ZIP specification introduce something
 -  called the &quot;language encoding flag&quot; which can be used to
 -  signal that a file name has been encoded using UTF-8.  Starting with
 -  Ant 1.8.0 all zip-/jar- and similar archives written by Ant will set
 -  this flag, if the encoding has been set to UTF-8.  Our
 -  interoperabilty tests with existing archivers didn't show any ill
 -  effects (in fact, most archivers ignore the flag to date), but you
 -  can turn off the "language encoding flag" by setting the attribute
 -  <code>useLanguageEncodingFlag</code> to <code>false</code> on the
 -  zip-task if you should encounter problems.</p>
 -
 -<p>The unzip (and similar tasks) -task will recognize the language
 -  encoding flag and ignore the encoding set on the task if it has been
 -  found.</p>
 -
 -<p>The InfoZIP developers have introduced new ZIP extra fields that
 -  can be used to add an additional UTF-8 encoded file name to the
 -  entry's metadata.  Most archivers ignore these extra fields.  The
 -  zip family of tasks support an
 -  option <code>createUnicodeExtraFields</code> since Ant 1.8.0 which
 -  makes Ant write these extra fields either for all entries ("always")
 -  or only those whose name cannot be encoded using the specified
 -  encoding (not-encodeable), it defaults to "never" since the extra
 -  fields create bigger archives.</p>
 -
 -<p>The fallbackToUTF8 attribute of zip can be used to create archives
 -  that use the specified encoding in the majority of cases but UTF-8 and
 -  the language encoding flag for filenames that cannot be encoded
 -  using the specified encoding.</p>
 -
 -<p>The unzip-task will recognize the unicode extra fields by default
 -  and read the file name information from them, unless you set the
 -  optional attribute <code>scanForUnicodeExtraFields</code> to
 -  false.</p>
 -
 -<h4>Recommendations for Interoperability</h4>
 -
 -<p>The optimal setting of flags depends on the archivers you expect as
 -  consumers/producers of the ZIP archives.  Below are some test
 -  results which may be superseeded with later versions of each
 -  tool.</p>
 +<h3 id="encoding">Encoding of file names</h3>
 +
 +<p>Traditionally the ZIP archive format uses CodePage 437 as encoding for file name, which is not
 +sufficient for many international character sets.</p>
 +
 +<p>Over time different archivers have chosen different ways to work around the
 +limitation&mdash;the <code class="code">java.util.zip</code> packages simply uses UTF-8 as its
 +encoding for example.</p>
 +
 +<p>Ant has been offering the <q>encoding</q> attribute of the <code>zip</code>
 +and <code>unzip</code> task as a way to explicitly specify the encoding to use (or expect) <em>since
 +Ant 1.4</em>.  It defaults to default JVM character encoding for <code>zip</code> and UTF-8
 +for <code>jar</code> and other jar-like tasks (<code>war</code>, <code>ear</code>, ...) as well as
 +the <code>unzip</code> family of tasks.</p>
 +
 +<p>More recent versions of the ZIP specification introduce something called the <q>language encoding
 +flag</q> which can be used to signal that a file name has been encoded using UTF-8. <em>Since Ant
 +1.8.0</em>, all zip, jar and similar archives written by Ant will set this flag, if the encoding has
 +been set to UTF-8.  Our interoperability tests with existing archivers didn't show any ill effects
 +(in fact, most archivers ignore the flag to date), but you can turn off the <q>language encoding
 +flag</q> by setting the attribute <var>useLanguageEncodingFlag</var> to <q>false</q> on
 +the <code>zip</code> task if you should encounter problems.</p>
 +
 +<p>The <code>unzip</code> task (and similar tasks) will recognize the language encoding flag and
 +ignore the encoding set on the task if it has been found.</p>
 +
 +<p>The InfoZIP developers have introduced new ZIP extra fields that can be used to add an additional
 +UTF-8 encoded file name to the entry's metadata.  Most archivers ignore these extra
 +fields.  <em>Since Ant 1.8.0</em>, the <code>zip</code> family of tasks support an
 +option <var>createUnicodeExtraFields</var>, which makes Ant write these extra fields either for all
 +entries (<q>always</q>) or only those whose name cannot be encoded using the specified encoding
 +(<q>not-encodeable</q>), it defaults to <q>never</q> since the extra fields create bigger
 +archives.</p>
 +
 +<p>The <var>fallbackToUTF8</var> attribute of <code>zip</code> can be used to create archives that
 +use the specified encoding in the majority of cases but UTF-8 and the language encoding flag for
 +filenames that cannot be encoded using the specified encoding.</p>
 +
 +<p>The <code>unzip</code> task will recognize the Unicode extra fields by default and read the file
 +name information from them, unless you set the optional
 +attribute <var>scanForUnicodeExtraFields</var> to <q>false</q>.</p>
 +
 +<h4>Recommendations for interoperability</h4>
 +
 +<p>The optimal setting of flags depends on the archivers you expect as consumers/producers of the
 +ZIP archives.  Below are some test results which may be superseded with later versions of each
 +tool.</p>
  
  <ul>
 -  <li>The java.util.zip package used by the jar executable or to read
 -    jars from your CLASSPATH reads and writes UTF-8 names, it doesn't
 -    set or recognize any flags or unicode extra fields.</li>
 -
 -  <li>Starting with Java7 <code>java.util.zip</code> writes UTF-8 by
 -    default and uses the language encoding flag.  It is possible to
 -    specify a different encoding when reading/writing ZIPs via new
 -    constructors.  The package now recognizes the language encoding
 -    flag when reading and ignores the Unicode extra fields.</li>
 -
 -  <li>7Zip writes CodePage 437 by default but uses UTF-8 and the
 -    language encoding flag when writing entries that cannot be encoded
 -    as CodePage 437 (similar to the zip task with fallbacktoUTF8 set
 -    to true).  It recognizes the language encoding flag when reading
 -    and ignores the unicode extra fields.</li>
 -
 -  <li>WinZIP writes CodePage 437 and uses unicode extra fields by
 -    default.  It recognizes the unicode extra field and the language
 -    encoding flag when reading.</li>
 -
 -  <li>Windows' "compressed folder" feature doesn't recognize any flag
 -    or extra field and creates archives using the platforms default
 -    encoding - and expects archives to be in that encoding when reading
 -    them.</li>
 -
 -  <li>InfoZIP based tools can recognize and write both, it is a
 -    compile time option and depends on the platform so your mileage
 -    may vary.</li>
 -
 -  <li>PKWARE zip tools recognize both and prefer the language encoding
 -    flag.  They create archives using CodePage 437 if possible and UTF-8
 -    plus the language encoding flag for file names that cannot be
 -    encoded as CodePage 437.</li>
 +  <li>The <code class="code">java.util.zip</code> package used by the <kbd>jar</kbd> executable or
 +    to read jars from your <code>CLASSPATH</code> reads and writes UTF-8 names, it doesn't set or
 +    recognize any flags or unicode extra fields.</li>
 +  <li>Since Java 7, <code class="code">java.util.zip</code> writes UTF-8 by default and uses the
 +    language encoding flag.  It is possible to specify a different encoding when reading/writing
 +    ZIPs via new constructors.  The package now recognizes the language encoding flag when reading
 +    and ignores the Unicode extra fields.</li>
 +  <li>7Zip writes CodePage 437 by default but uses UTF-8 and the language encoding flag when writing
 +    entries that cannot be encoded as CodePage 437 (similar to the <code>zip</code> task
 +    with <var>fallbacktoUTF8</var> set to <q>true</q>).  It recognizes the language encoding flag
 +    when reading and ignores the Unicode extra fields.</li>
 +  <li>WinZIP writes CodePage 437 and uses Unicode extra fields by default.  It recognizes the
 +    Unicode extra field and the language encoding flag when reading.</li>
 +  <li>Windows' "compressed folder" feature doesn't recognize any flag or extra field and creates
 +    archives using the default platform encoding&mdash;and expects archives to be in that encoding
 +    when reading them.</li>
 +  <li>InfoZIP based tools can recognize and write both, it is a compile time option and depends on
 +    the platform so your mileage may vary.</li>
 +  <li>PKWARE zip tools recognize both and prefer the language encoding flag.  They create archives
 +    using CodePage 437 if possible and UTF-8 plus the language encoding flag for file names that
 +    cannot be encoded as CodePage 437.</li>
  </ul>
  
  <p>So, what to do?</p>