Browse Source

Add documentation for zip64mode attribute

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1462931 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 12 years ago
parent
commit
5588e0e665
5 changed files with 85 additions and 0 deletions
  1. +6
    -0
      WHATSNEW
  2. +9
    -0
      manual/Tasks/ear.html
  3. +9
    -0
      manual/Tasks/jar.html
  4. +9
    -0
      manual/Tasks/war.html
  5. +52
    -0
      manual/Tasks/zip.html

+ 6
- 0
WHATSNEW View File

@@ -13,6 +13,12 @@ Fixed bugs:
* Corrected XSLTC error in <junitreport>.
Bugzilla Report 54641.

* Provide more control over Zip64 extensions created by <zip> and
related tasks. In particular no Zip64 extensions will be used at
all by the <jar> task family by default - this is required for jars
to be readably by Java5.
Bugzilla Report 54762.

Other changes:
--------------



+ 9
- 0
manual/Tasks/ear.html View File

@@ -264,6 +264,15 @@ to a value other than its default, <code>&quot;add&quot;</code>.</b></p>
<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>
</tr>
</table>

<h3>Nested elements</h3>


+ 9
- 0
manual/Tasks/jar.html View File

@@ -320,6 +320,15 @@ to a value other than its default, <code>"add"</code>.</b></p>
<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>
</tr>
</table>

<h3>Nested elements</h3>


+ 9
- 0
manual/Tasks/war.html View File

@@ -267,6 +267,15 @@ to a value other than its default, <code>&quot;add&quot;</code>.</b></p>
<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>
</tr>
</table>

<h3>Nested elements</h3>


+ 52
- 0
manual/Tasks/zip.html View File

@@ -272,6 +272,14 @@ archive.</p>
<br/>See also the <a href="#encoding">discussion below</a></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="#zip64">discussion below</a></td>
<td align="center" valign="top">No, default is "as-needed"</td>
</tr>
</table>

<h3><a name="encoding">Encoding of File Names</a></h3>
@@ -390,6 +398,50 @@ archive.</p>
so the tools that support them will extract the file names
correctly.</p>

<h3><a name="zip64">Zip64 extensions</a></h3>

<p>Zip64 extensions provide a way to create archives bigger than 4GB
or holding more than 65535 entries - or add individual entries
bigger than 4GB using the ZIP extension field mechanism. These
extensions are supported by most modern ZIP implementations.</p>

<p>When Ant writes compressed entries into the archive it creates it
doesn't know the compressed size of an entry before it has been
written. Unfortunately the decision whether a Zip64 extra field
will be written has to be made before writing the entry's
content.</p>

<p>Starting with Ant 1.9.0 Ant supports Zip64 extensions but didn't
provide any control over their usage, starting with Ant 1.9.1 a
new <em>zip64mode</em> attribute was added to the <code>zip</code>
family of tasks. It supports three values:

<ul>
<li><em>never</em> means no Zip64 extra fields will ever be
written, this is the behavior of Ant 1.8.x and earlier and the
default behavior of <code>jar</code>, <code>ear</code>
and <code>war</code> starting with Ant 1.9.1.</li>
<li><em>always</em> means Zip64 extra fields are written for all
entries.</li>
<li><em>as-needed</em> means Zip64 extra fields are written for all
compressed entries to the "local file header" (by default these
are all files but not the directories) but only written to the
central directory if the entry really required Zip64 features.
This is the default behavior of Ant 1.9.0 and remains the default
behavior of the <code>zip</code> task.</li>
</ul>

<p><em>as-needed</em> provides a good compromise if you don't know
whether you archive will exceed the limits of traditional zip files
but don't want to waste too much space (the Zip64 extensions take up
extra space). Unfortunately some ZIP implementations don't
understand Zip64 extra fields or fail to parse archives with extra
fields in local file headers that are not present in the central
directory, one such implementation is the java.util.zip package of
Java5, that's why the <code>jar</code> tasks default
to <em>never</em>. Archives created with <em>as-needed</em> can be
read without problems with Java6 and later.</p>

<h3>Parameters specified as nested elements</h3>

<h4>any resource collection</h4>


Loading…
Cancel
Save