ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r812884 - /ant/sandbox/antlibs/compress/trunk/docs/expand.html
Date Wed, 09 Sep 2009 11:04:09 GMT
Author: bodewig
Date: Wed Sep  9 11:04:09 2009
New Revision: 812884

URL: http://svn.apache.org/viewvc?rev=812884&view=rev
Log:
document unarchival tasks

Added:
    ant/sandbox/antlibs/compress/trunk/docs/expand.html   (contents, props changed)
      - copied, changed from r812756, ant/core/trunk/docs/manual/CoreTasks/unzip.html

Copied: ant/sandbox/antlibs/compress/trunk/docs/expand.html (from r812756, ant/core/trunk/docs/manual/CoreTasks/unzip.html)
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/docs/expand.html?p2=ant/sandbox/antlibs/compress/trunk/docs/expand.html&p1=ant/core/trunk/docs/manual/CoreTasks/unzip.html&r1=812756&r2=812884&rev=812884&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/unzip.html (original)
+++ ant/sandbox/antlibs/compress/trunk/docs/expand.html Wed Sep  9 11:04:09 2009
@@ -18,52 +18,35 @@
 
 <head>
 <meta http-equiv="Content-Language" content="en-us">
-<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
-<title>Unzip Task</title>
+<link rel="stylesheet" type="text/css" href="style.css">
+<title>Unarchiving Task</title>
 </head>
 
 <body>
 
-<h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2>
-<h3>Description</h3>
-<p>Unzips a zip-, war-, or jar file.</p>
-<p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select
files to extract
-<I>from</I> the archive.  If no patternset is used, all files are extracted.
-</p>
+<h2><a name="expand">Unarchiving Tasks</a></h2>
 
-<p><a href="../CoreTypes/resources.html#collection">Resource
-Collection</a>s may be used to select archived files to perform
-unarchival upon.  Only file system based resource collections are
-supported by Unjar/Unwar/Unzip, this includes <a
-href="../CoreTypes/fileset.html">fileset</a>, <a
-href="../CoreTypes/filelist.html">filelist</a>, <a
-href="../using.html#path">path</a>, and <a
-href="../CoreTypes/resources.html#files">files</a>.
-Untar supports arbitrary resource collections.
-Prior to Ant 1.7 only fileset has been supported as a nested element.</p>
+<p>For each of the supported archiving formats there is a
+  correspondig <code>unarchiving</code> task.  These tasks are based
+  on
+  their <a href="http://ant.apache.org/manual/CoreTasks/unzip.html">core
+  cousin tasks</a>.</p>
 
-<p>You can define filename transformations by using a nested <a href="../CoreTypes/mapper.html">mapper</a>
element.  The default mapper is the
-<a href="../CoreTypes/mapper.html#identity-mapper">identity mapper</a>.
+<p><a href="http://ant.apache.org/manual/CoreTypes/patternset.html">PatternSet</a>s
are used to select files to extract
+<I>from</I> the archive.  If no patternset is used, all files are extracted.
 </p>
-<p>File permissions will not be restored on extracted files.</p>
-<p>The untar task recognizes the long pathname entries used by GNU tar.<p>
 
-<p><b>Please 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><a href="http://ant.apache.org/manual/CoreTypes/resources.html#collection">Resource
+Collection</a>s may be used to select archived files to perform
+unarchival upon.</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>You can define filename transformations by using a
+nested <a href="http://ant.apache.org/manual/CoreTypes/mapper.html">mapper</a>
+element.  The default mapper is the
+<a href="http://ant.apache.org/manual/CoreTypes/mapper.html#identity-mapper">identity
+mapper</a>.</p>
 
+<p>File permissions will not be restored on extracted files.</p>
 
 <h3>Parameters</h3>
 <table border="1" cellpadding="2" cellspacing="0">
@@ -90,13 +73,65 @@
     <td align="center" valign="top">No</td>
   </tr>
   <tr>
-    <td valign="top">compression</td>
-    <td valign="top"><b>Note:</b> This attribute is only available for
-    the <code>untar</code> task.<br>
-    compression method.  Allowable values are &quot;none&quot;,
-    &quot;gzip&quot; and &quot;bzip2&quot;.  Default is
-    &quot;none&quot;.</td>
-    <td valign="top" align="center">No</td>
+    <td valign="top">failOnEmptyArchive</td>
+    <td valign="top">whether trying to extract an empty archive is an
+      error.</td>
+    <td valign="top" align="center">No, defaults to false</td>
+  </tr>
+  <tr>
+    <td valign="top">stripAbsolutePathSpec</td>
+    <td valign="top">whether Ant should remove leading '/' or '\'
+      characters from the extracted file name before extracing it.
+      Note that this changes the entry's name before applying
+      include/exclude patterns and before using the nested mappers (if
+      any).</td>
+    <td valign="top" align="center">No, defaults to false</td>
+  </tr>
+</table>
+
+<h3><a name="unar">UnAr</a></h3>
+
+<p>An <a href="#expand">unarchiving task</a> for AR archives.</p>
+
+<h3><a name="uncpio">UnCpio</a></h3>
+
+<p>An <a href="#expand">unarchiving task</a> for CPIO archives.</p>
+
+<h3><a name="untar">UnTar</a></h3>
+
+<p>An <a href="#expand">unarchiving task</a> for TAR archives.</p>
+
+<h3><a name="unzip">UnZip</a></h3>
+
+<p>An <a href="#expand">unarchiving task</a> for ZIP archives.</p>
+
+<p><b>Please 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>Apache Commons Compress' 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>In addition to the parameters above, the unzip tasks supports the
+  following attributes:</p>
+
+<p>Unlike its counterpart in Ant's core this Antlib's task can also
+  extract archives that are not file system resources.</p>
+
+<table border="1" cellpadding="2" cellspacing="0">
+  <tr>
+    <td valign="top"><b>Attribute</b></td>
+    <td valign="top"><b>Description</b></td>
+    <td align="center" valign="top"><b>Required</b></td>
   </tr>
   <tr>
     <td valign="top">encoding</td>
@@ -113,21 +148,6 @@
     <td align="center" valign="top">No</td>
   </tr>
   <tr>
-    <td valign="top">failOnEmptyArchive</td>
-    <td valign="top">whether trying to extract an empty archive is an
-      error. <em>since Ant 1.8.0</em></td>
-    <td valign="top" align="center">No, defaults to false</td>
-  </tr>
-  <tr>
-    <td valign="top">stripAbsolutePathSpec</td>
-    <td valign="top">whether Ant should remove leading '/' or '\'
-      characters from the extracted file name before extracing it.
-      Note that this changes the entry's name before applying
-      include/exclude patterns and before using the nested mappers (if
-      any).  <em>since Ant 1.8.0</em></td>
-    <td valign="top" align="center">No, defaults to false</td>
-  </tr>
-  <tr>
     <td valign="top">scanForUnicodeExtraFields</td>
     <td valign="top"><b>Note:</b> This attribute is not available for
     the <code>untar</code> task.<br>
@@ -138,27 +158,32 @@
     <td align="center" valign="top">No, defaults to true</td>
   </tr>
 </table>
+
 <h3>Examples</h3>
 <pre>
-&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;/&gt;
+&lt;cmp:unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
+    dest=&quot;${tools.home}&quot;
+    xmlns:cmp="antlib:org.apache.ant.compress"/&gt;
 </pre>
 <p>
 <pre>
-&lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;
-&lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
+&lt;cmp:gunzip src=&quot;tools.tar.gz&quot; xmlns:cmp="antlib:org.apache.ant.compress"/&gt;
+&lt;cmp:untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;
+    xmlns:cmp="antlib:org.apache.ant.compress"/&gt;
 </pre>
 <pre>
-&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
+&lt;cmp:unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
+       xmlns:cmp="antlib:org.apache.ant.compress"
        dest=&quot;${tools.home}&quot;&gt;
     &lt;patternset&gt;
         &lt;include name=&quot;**/*.java&quot;/&gt;
         &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
     &lt;/patternset&gt;
-&lt;/unzip&gt;
+&lt;/cmp:unzip&gt;
 </pre>
 <p>
 <pre>
-&lt;unzip dest=&quot;${tools.home}&quot;&gt;
+&lt;cmp:unzip dest=&quot;${tools.home} xmlns:cmp="antlib:org.apache.ant.compress"&quot;&gt;
     &lt;patternset&gt;
         &lt;include name=&quot;**/*.java&quot;/&gt;
         &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
@@ -167,74 +192,79 @@
         &lt;include name=&quot;**/*.zip&quot;/&gt;
         &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
     &lt;/fileset&gt;
-&lt;/unzip&gt;
+&lt;/cmp:unzip&gt;
 </pre>
 <p>
 <pre>
-&lt;unzip src=&quot;apache-ant-bin.zip&quot; dest=&quot;${tools.home}&quot;&gt;
+&lt;cmp:unzip src=&quot;apache-ant-bin.zip&quot;
+    dest=&quot;${tools.home}&quot;
+    xmlns:cmp="antlib:org.apache.ant.compress"&gt;
     &lt;patternset&gt;
         &lt;include name=&quot;apache-ant/lib/ant.jar&quot;/&gt;
     &lt;/patternset&gt;
     &lt;mapper type=&quot;flatten&quot;/&gt;
-&lt;/unzip&gt;
+&lt;/cmp:unzip&gt;
 </pre>
 
 <h3>Related tasks</h3>
 
 <pre>
-&lt;unzip src="some-archive" dest="some-dir"&gt;
+&lt;cmp:unzip src="some-archive" dest="some-dir" xmlns:cmp="antlib:org.apache.ant.compress"&gt;
   &lt;patternset&gt;
     &lt;include name="some-pattern"/&gt;
   &lt;/patternset&gt;
   &lt;mapper type=&quot;some-mapper&quot;/&gt;
-&lt;/unzip&gt;
+&lt;/cmp:unzip&gt;
 </pre>
 
 is identical to
 
 <pre>
 &lt;copy todir="some-dir" preservelastmodified="true"&gt;
-  &lt;zipfileset src="some-archive"&gt;
+  &lt;cmp:zipfileset src="some-archive" xmlns:cmp="antlib:org.apache.ant.compress"&gt;
     &lt;patternset&gt;
       &lt;include name="some-pattern"/&gt;
     &lt;/patternset&gt;
-  &lt;/zipfileset&gt;
+  &lt;/cmp:zipfileset&gt;
   &lt;mapper type=&quot;some-mapper&quot;/&gt;
 &lt;/copy&gt;
 </pre>
 
 <p>The same is also true for <code>&lt;untar&gt;</code> and
 <code>&lt;tarfileset&gt;</code>.  <code>&lt;copy&gt;</code>
offers
-additional features like <a href="../CoreTypes/filterchain.html">filtering files</a>
on the fly,
-allowing a file to be mapped to multiple destinations or a
-configurable file system timestamp granularity.</p>
+additional features
+like <a href="http://ant.apache.org/manual/CoreTypes/filterchain.html">filtering
+files</a> on the fly, allowing a file to be mapped to multiple
+destinations or a configurable file system timestamp granularity.</p>
 
-<pre>&lt;zip destfile=&quot;new.jar&quot;&gt;
-  &lt;zipfileset src=&quot;old.jar&quot;&gt;
+<pre>&lt;cmp:zip destfile=&quot;new.jar&quot; xmlns:cmp="antlib:org.apache.ant.compress"&gt;
+  &lt;cmp:zipfileset src=&quot;old.jar&quot;&gt;
     &lt;exclude name=&quot;do/not/include/this/class&quot;/&gt;
-  &lt;/zipfileset&gt;
-&lt;/zip&gt;
+  &lt;/cmp:zipfileset&gt;
+&lt;/cmp:zip&gt;
 </pre>
 <p>&quot;Deletes&quot; files from a zipfile.</p>
 
 <pre>
-&lt;unzip src=&quot;${ant.home}/lib/ant.jar&quot; dest=&quot;...&quot;&gt;
+&lt;cmp:unzip src=&quot;${ant.home}/lib/ant.jar&quot;
+    dest=&quot;...&quot; xmlns:cmp="antlib:org.apache.ant.compress"&gt;
   &lt;patternset&gt;
     &lt;include name=&quot;images/&quot;/&gt;
   &lt;/patternset&gt;
-&lt;/unzip&gt;
+&lt;/cmp:unzip&gt;
 </pre>
 <p>This extracts all images from <tt>ant.jar</tt> which are stored in the
<tt>images</tt> directory
 of the Jar (or somewhere under it). While extracting the directory structure (<tt>images</tt>)
 will be taken.</p>
 
 <pre>
-&lt;unzip src=&quot;${ant.home}/lib/ant.jar&quot; dest=&quot;...&quot;&gt;
+&lt;cmp:unzip src=&quot;${ant.home}/lib/ant.jar&quot;
+    dest=&quot;...&quot; xmlns:cmp="antlib:org.apache.ant.compress"&gt;
   &lt;patternset&gt;
     &lt;include name=&quot;**/ant_logo_large.gif&quot;/&gt;
     &lt;include name=&quot;**/LICENSE.txt&quot;/&gt;
   &lt;/patternset&gt;
-&lt;/unzip&gt;
+&lt;/cmp:unzip&gt;
 </pre>
 <p>This extracts the two files <tt>ant_logo_large.gif</tt> and <tt>LICENSE.txt</tt>
from the
 <tt>ant.jar</tt>. More exactly: it extracts all files with these names from anywhere
in the source file. While extracting the directory structure will be taken.</p>

Propchange: ant/sandbox/antlibs/compress/trunk/docs/expand.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/sandbox/antlibs/compress/trunk/docs/expand.html
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: ant/sandbox/antlibs/compress/trunk/docs/expand.html
------------------------------------------------------------------------------
    svn:mergeinfo = 



Mime
View raw message