Repository: ant Updated Branches: refs/heads/master f479b5f52 -> 6a40bdb9d
document XZ support - PR 60350 Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/6a40bdb9 Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/6a40bdb9 Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/6a40bdb9 Branch: refs/heads/master Commit: 6a40bdb9d3797a0f081184807f58a79122e0f6bd Parents: f479b5f Author: Stefan Bodewig <[email protected]> Authored: Thu Jan 12 17:19:15 2017 +0100 Committer: Stefan Bodewig <[email protected]> Committed: Thu Jan 12 17:19:15 2017 +0100 ---------------------------------------------------------------------- WHATSNEW | 10 ++++++++ manual/Tasks/pack.html | 15 ++++++++--- manual/Tasks/unpack.html | 27 +++++++++++++------- manual/Types/resources.html | 13 ++++++++++ manual/install.html | 6 +++++ manual/tasklist.html | 2 ++ manual/tasksoverview.html | 8 +++--- .../org/apache/tools/ant/taskdefs/Untar.java | 5 ++-- 8 files changed, 68 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/WHATSNEW ---------------------------------------------------------------------- diff --git a/WHATSNEW b/WHATSNEW index cd71f34..540bc1c 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -1,6 +1,16 @@ Changes from Ant 1.10.0 TO Ant 1.10.1 ===================================== +Other changes: +-------------- + + * new tasks <xz> and <unxz> and resource <xzresource> for XZ + compression. Also the compression attribute of <tar>/<untar> now + accepts "xz" as valid value. + The tasks and type are contained in the new ant-xz.jar and require + the library XZ for Java to be on the CLASSPATH. + Bugzilla Report 60350 + Changes from Ant 1.9.7 TO Ant 1.10.0 ==================================== http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/manual/Tasks/pack.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/pack.html b/manual/Tasks/pack.html index 60ae1e5..b673333 100644 --- a/manual/Tasks/pack.html +++ b/manual/Tasks/pack.html @@ -19,16 +19,22 @@ <head> <meta http-equiv="Content-Language" content="en-us"> <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"> -<title>GZip/BZip2 Tasks</title> +<title>GZip/BZip2/XZ Tasks</title> </head> <body> <h2><a name="pack">GZip/BZip2</a></h2> <h3>Description</h3> -<p>Packs a resource using the GZip or BZip2 algorithm. +<p>Packs a resource using the GZip, BZip2 or XZ algorithm. The output file is only generated if it doesn't exist or the source resource is newer.</p> + +<p>XZ compression support has been added with Apache Ant 1.10.1 and +depends on external libraries not included in the Ant distribution. +See <a href="../install.html#librarydependencies">Library +Dependencies</a> for more information.</p> + <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> @@ -38,7 +44,7 @@ resource is newer.</p> </tr> <tr> <td valign="top">src</td> - <td valign="top">the file to gzip/bzip.</td> + <td valign="top">the file to gzip/bzip/xz.</td> <td align="center" valign="top">Yes, or a nested resource collection.</td> </tr> <tr> @@ -64,6 +70,9 @@ resource collection</h4> <bzip2 src="test.tar" destfile="test.tar.bz2"/> </pre></blockquote> <blockquote><pre> +<xz src="test.tar" destfile="test.tar.xz"/> +</pre></blockquote> +<blockquote><pre> <gzip destfile="archive.tar.gz"> <url url="http://example.org/archive.tar"/> </gzip> http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/manual/Tasks/unpack.html ---------------------------------------------------------------------- diff --git a/manual/Tasks/unpack.html b/manual/Tasks/unpack.html index dcc88a9..f7def5d 100644 --- a/manual/Tasks/unpack.html +++ b/manual/Tasks/unpack.html @@ -24,17 +24,22 @@ <body> -<h2><a name="unpack">GUnzip/BUnzip2</a></h2> +<h2><a name="unpack">GUnzip/BUnzip2/UnXZ</a></h2> <h3>Description</h3> -<p>Expands a resource packed using GZip or BZip2.</p> +<p>Expands a resource packed using GZip, BZip2 or XZ.</p> <p>If <i>dest</i> is a directory the name of the destination file is -the same as <i>src</i> (with the ".gz" or ".bz2" +the same as <i>src</i> (with the ".gz", ".bz2" or ".xz" extension removed if present). If <i>dest</i> is omitted, the parent dir of <i>src</i> is taken. The file is only expanded if the source resource is newer than the destination file, or when the destination file does not exist.</p> +<p>XZ compression support has been added with Apache Ant 1.10.1 and +depends on external libraries not included in the Ant distribution. +See <a href="../install.html#librarydependencies">Library +Dependencies</a> for more information.</p> + <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> @@ -70,6 +75,10 @@ resource collection</h4> </pre></blockquote> <p>expands <i>test.tar.bz2</i> to <i>test.tar</i></p> <blockquote><pre> +<uncz src="test.tar.xz"/> +</pre></blockquote> +<p>expands <i>test.tar.xz</i> to <i>test.tar</i></p> +<blockquote><pre> <gunzip src="test.tar.gz" dest="test2.tar"/> </pre></blockquote> <p>expands <i>test.tar.gz</i> to <i>test2.tar</i></p> @@ -104,12 +113,12 @@ is identical to </pre> <p>The same is also true for <code><bunzip2></code> and -<code><bzip2resource></code>. <code><copy></code> offers -additional features like <a -href="../Types/filterchain.html">filtering files</a> on the fly, -allowing a file to be mapped to multiple destinations, preserving the -last modified time or a configurable file system timestamp -granularity.</p> +<code><bzip2resource></code> or <code>%lt;unxz></code> +and <code>%lt;xzresource></code>. <code><copy></code> offers +additional features like <a href="../Types/filterchain.html">filtering +files</a> on the fly, allowing a file to be mapped to multiple +destinations, preserving the last modified time or a configurable file +system timestamp granularity.</p> http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/manual/Types/resources.html ---------------------------------------------------------------------- diff --git a/manual/Types/resources.html b/manual/Types/resources.html index 8ba77aa..b90ee23 100644 --- a/manual/Types/resources.html +++ b/manual/Types/resources.html @@ -49,6 +49,7 @@ explicit use beginning in <b>Ant 1.7</b>. <li><a href="#string">string</a> - a text string.</li> <li><a href="#tarentry">tarentry</a> - an entry in a tar file.</li> <li><a href="#url">url</a> - a URL.</li> + <li><a href="#xzresource">xzresource</a> - an XZ compressed resource.</li> <li><a href="#zipentry">zipentry</a> - an entry in a zip file.</li> </ul> @@ -277,6 +278,18 @@ resource providing compression of the resource's contents on the fly. A single element resource collection must be specified as a nested element.</p> +<h4><a name="xzresource">xzresource</a></h4> + +<p>This is not a stand-alone resource, but a wrapper around another +resource providing compression of the resource's contents on the fly. +A single element resource collection must be specified as a nested +element.</p> + +<p>XZ compression support has been added with Apache Ant 1.10.1 and +depends on external libraries not included in the Ant distribution. +See <a href="../install.html#librarydependencies">Library +Dependencies</a> for more information.</p> + <h4><a name="url">url</a></h4> <p>Represents a URL.</p> http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/manual/install.html ---------------------------------------------------------------------- diff --git a/manual/install.html b/manual/install.html index 818b168..51ab721 100644 --- a/manual/install.html +++ b/manual/install.html @@ -1018,6 +1018,12 @@ you need jakarta-oro 2.0.8 or later, and <a href="#commons-net">commons-net</a>< <td><a href="https://jai.dev.java.net/" target="_top">https://jai.dev.java.net/</a></td> </tr> + <tr> + <td>XZ - XZ for Java <b>1.6 or later</b></td> + <td>xz and unxz tasks, xzresource, xz compression in tar/untar</td> + <td><a href="http://www.tukaani.org/xz/java.html" + target="_top">http://www.tukaani.org/xz/java.html</a></td> + </tr> </table> <br> <h2><a name="Troubleshooting">Troubleshooting</a></h2> http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/manual/tasklist.html ---------------------------------------------------------------------- diff --git a/manual/tasklist.html b/manual/tasklist.html index b57c851..5829b4d 100644 --- a/manual/tasklist.html +++ b/manual/tasklist.html @@ -178,6 +178,7 @@ <li><a href="Tasks/unzip.html">Unjar</a></li> <li><a href="Tasks/unzip.html">Untar</a></li> <li><a href="Tasks/unzip.html">Unwar</a></li> +<li><a href="Tasks/unpack.html">UnXZ</a></li> <li><a href="Tasks/unzip.html">Unzip</a></li> <li><a href="Tasks/uptodate.html">Uptodate</a></li> <li><a href="Tasks/verifyjar.html">VerifyJar</a></li> @@ -188,6 +189,7 @@ <li><a href="Tasks/wljspc.html">Weblogic JSP Compiler</a></li> <li><a href="Tasks/xmlproperty.html">XmlProperty</a></li> <li><a href="Tasks/xmlvalidate.html">XmlValidate</a></li> +<li><a href="Tasks/pack.html">XZ</a></li> <li><a href="Tasks/style.html">XSLT/<i>Style</i></a></li> <li><a href="Tasks/zip.html">Zip</a></li> </ul> http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/manual/tasksoverview.html ---------------------------------------------------------------------- diff --git a/manual/tasksoverview.html b/manual/tasksoverview.html index d04fb4f..776082c 100644 --- a/manual/tasksoverview.html +++ b/manual/tasksoverview.html @@ -67,13 +67,13 @@ documentation.</p> </tr> <tr valign="top"> - <td nowrap><a href="Tasks/unpack.html">BUnzip2</a></td> - <td><p>Expands a file packed using GZip or BZip2.</p></td> + <td nowrap><a href="Tasks/unpack.html">GUnzip/BUnzip2/UnXZ</a></td> + <td><p>Expands a file packed using GZip, BZip2 or XZ.</p></td> </tr> <tr valign="top"> - <td nowrap><a href="Tasks/pack.html">BZip2</a></td> - <td><p>Packs a file using the GZip or BZip2 algorithm. This task + <td nowrap><a href="Tasks/pack.html">GZip/BZip2/XZ</a></td> + <td><p>Packs a file using the GZip, BZip2 or XZ algorithm. This task does not do any dependency checking; the output file is always generated</p></td> </tr> http://git-wip-us.apache.org/repos/asf/ant/blob/6a40bdb9/src/main/org/apache/tools/ant/taskdefs/Untar.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/Untar.java b/src/main/org/apache/tools/ant/taskdefs/Untar.java index 8e841c0..c3e6e15 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Untar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Untar.java @@ -18,13 +18,13 @@ package org.apache.tools.ant.taskdefs; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.util.zip.GZIPInputStream; import org.apache.tools.ant.BuildException; @@ -72,6 +72,7 @@ public class Untar extends Expand { * <li>none - no compression * <li>gzip - Gzip compression * <li>bzip2 - Bzip2 compression + * <li>xz - XZ compression, requires XZ for Java * </ul> * * @param method compression method
