source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.6.2/manual/CoreTasks/unzip.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 3.8 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Unzip Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2>
12<h3>Description</h3>
13<p>Unzips a zip-, war-, tar- or jarfile.</p>
14<p>For JDK 1.1 &quot;last modified time&quot; field is set to current time instead of being
15carried from the archive file.</p>
16<p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select files to extract
17<I>from</I> the archive. If no patternset is used, all files are extracted.
18</p>
19<p><a href="../CoreTypes/fileset.html">FileSet</a>s may be used used to select archived files
20to perform unarchival upon.
21</p>
22<p>File permissions will not be restored on extracted files.</p>
23<p>The untar task recognizes the long pathname entries used by GNU tar.<p>
24<h3>Parameters</h3>
25<table border="1" cellpadding="2" cellspacing="0">
26 <tr>
27 <td valign="top"><b>Attribute</b></td>
28 <td valign="top"><b>Description</b></td>
29 <td align="center" valign="top"><b>Required</b></td>
30 </tr>
31 <tr>
32 <td valign="top">src</td>
33 <td valign="top">archive file to expand.</td>
34 <td align="center" valign="top">Yes, if filesets are not used.</td>
35 </tr>
36 <tr>
37 <td valign="top">dest</td>
38 <td valign="top">directory where to store the expanded files.</td>
39 <td align="center" valign="top">Yes</td>
40 </tr>
41 <tr>
42 <td valign="top">overwrite</td>
43 <td valign="top">Overwrite files, even if they are newer than the
44 corresponding entries in the archive (true or false, default is
45 true).</td>
46 <td align="center" valign="top">No</td>
47 </tr>
48 <tr>
49 <td valign="top">compression</td>
50 <td valign="top"><b>Note:</b> This attribute is only available for
51 the <code>untar</code> task.<br>
52 compression method. Allowable values are &quot;none&quot;,
53 &quot;gzip&quot; and &quot;bzip2&quot;. Default is
54 &quot;none&quot;.</td>
55 <td valign="top" align="center">No</td>
56 </tr>
57 <tr>
58 <td valign="top">encoding</td>
59 <td valign="top"><b>Note:</b> This attribute is not available for
60 the <code>untar</code> task.<br>
61 The character encoding that has been used for filenames
62 inside the zip file. For a list of possible values see <a
63 href="http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html">http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html</a>.<br>
64 Defaults to &quot;UTF8&quot;, use the magic value
65 <code>native-encoding</code> for the platform's default character
66 encoding.</td>
67 <td align="center" valign="top">No</td>
68 </tr>
69
70</table>
71<h3>Examples</h3>
72<blockquote>
73 <p><code>&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;/&gt;</code></p>
74</blockquote>
75<blockquote>
76 <p><code>
77&lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;<br>
78&lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
79</code></p>
80</blockquote>
81<blockquote>
82<p><pre>
83&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
84 dest=&quot;${tools.home}&quot;&gt;
85 &lt;patternset&gt;
86 &lt;include name=&quot;**/*.java&quot;/&gt;
87 &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
88 &lt;/patternset&gt;
89&lt;/unzip&gt;
90</pre></p>
91</blockquote>
92<blockquote>
93<p><pre>
94&lt;unzip dest=&quot;${tools.home}&quot;&gt;
95 &lt;patternset&gt;
96 &lt;include name=&quot;**/*.java&quot;/&gt;
97 &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
98 &lt;/patternset&gt;
99 &lt;fileset dir=&quot;.&quot;&gt;
100 &lt;include name=&quot;**/*.zip&quot;/&gt;
101 &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
102 &lt;/fileset&gt;
103&lt;/unzip&gt;
104</pre></p>
105</blockquote>
106<hr>
107<p align="center">Copyright &copy; 2000-2004 The Apache Software Foundation. All rights
108Reserved.</p>
109
110</body>
111</html>
112
Note: See TracBrowser for help on using the repository browser.