blob: e2dbf3c74d0ab72a1af4c5647185a6cabb15e387 [file] [log] [blame]
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Apache Compress Antlib User Manual</title>
<h2>Apache Compress Antlib User Manual</h2>
<p>This Antlib contains tasks and resources that provide
compression/uncompression and archival/unarchival capabilities
based on <a href="">Apache
Commons Compress</a>. Using Apache Commons Compress 1.1 this
Antlib supports gzip and bzip2 compression and ar, cpio, tar and
zip archives.</p>
<h3>Known Limitations</h3>
<p>Reading AR archives from non-filesystem resources currently
fails for reasons that haven't been investigated, yet. Most
likely the problem is within Apache Commons Compress.</p>
<h3>Tasks and Types</h3>
<p>This Antlib contains the following tasks:</p>
<li><a href="archive.html#ar">ar</a></li>
<li><a href="unpack.html#bunzip2">bunzip2</a></li>
<li><a href="pack.html#bzip2">bzip2</a></li>
<li><a href="archive.html#cpio">cpio</a></li>
<li><a href="unpack.html#gunzip">gunzip</a></li>
<li><a href="pack.html#gzip">gzip</a></li>
<li><a href="archive.html#tar">tar</a></li>
<li><a href="expand.html#unar">unar</a></li>
<li><a href="expand.html#uncpio">uncpio</a></li>
<li><a href="expand.html#untar">untar</a></li>
<li><a href="expand.html#unzip">unzip</a></li>
<li><a href="archive.html#zip">zip</a></li>
<p>This Antlib contains the following resources:</p>
<li><a href="archives.html">archives</a></li>
<li><a href="entry.html#arentry">arentry</a></li>
<li><a href="fileset.html#arfileset">arfileset</a></li>
<li><a href="compresource.html#bzip2resource">bzip2resource</a></li>
<li><a href="entry.html#cpioentry">cpioentry</a></li>
<li><a href="fileset.html#cpiofileset">cpiofileset</a></li>
<li><a href="compresource.html#gzipresource">gzipresource</a></li>
<li><a href="entry.html#tarentry">tarentry</a></li>
<li><a href="fileset.html#tarfileset">tarfileset</a></li>
<li><a href="entry.html#zipentry">zipentry</a></li>
<li><a href="fileset.html#zipfileset">zipfileset</a></li>
<p>This Antlib contains the following conditions that work on the
<code>*entry</code>-resources of this Antlib as well as their
counterparts in Ant itself:</p>
<li><a href="conditions.html#hasgroupid">hasgroupid</a></li>
<li><a href="conditions.html#hasgroupname">hasgroupname</a></li>
<li><a href="conditions.html#hasmode">hasmode</a></li>
<li><a href="conditions.html#hasuserid">hasuserid</a></li>
<li><a href="conditions.html#hasusername">hasusername</a></li>
<h3>Installing and Using</h3>
<p>This Antlib requires Apache Ant 1.8.0 or higher and Apache
Commons Compress 1.1 or higher.</p>
<p>If you are building the Antlib from sources, run
the <code>antlib</code> target and you'll get a
file <code>ant-compress-VERSION.jar</code>. If you've
downloaded a binary release, you are already there.</p>
<p>In order to use the Antlib, you can either
use <code>taskdef</code> or rely on Ant's autodiscovery by using
an XML namespace and the Antlib's URI. The <code>taskdef</code>
approach allows you to specify a custom classpath while you must
make sure Ant finds the Antlib itself as well as Apache Commons
Compress - either because it is in a well known place like
<code>$ANT_HOME/lib</code> or using the <code>-lib</code>
command line option - when using autodiscovey.</p>
<h4>The <code>taskdef</code> approach</h4>
<p>Before you can use any of the tasks or resources you must use
a <code>taskdef</code> task like:</p>
&lt;pathelement location="YOUR-PATH-TO/ant-compress-VERSION1.jar"/&gt;
&lt;pathelement location="YOUR-PATH-TO/commons-compress-VERSION2.jar"/&gt;
<p>And later use something like:</p>
<h4>The autodiscovery approach</h4>
<p>And later use something like:</p>