source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/CoreTasks/unzip.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 3.7 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<pre>
73&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;/&gt;
74</pre>
75<p/>
76<pre>
77&lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;
78&lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
79</pre>
80<pre>
81&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
82 dest=&quot;${tools.home}&quot;&gt;
83 &lt;patternset&gt;
84 &lt;include name=&quot;**/*.java&quot;/&gt;
85 &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
86 &lt;/patternset&gt;
87&lt;/unzip&gt;
88</pre>
89<p/>
90<pre>
91&lt;unzip dest=&quot;${tools.home}&quot;&gt;
92 &lt;patternset&gt;
93 &lt;include name=&quot;**/*.java&quot;/&gt;
94 &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
95 &lt;/patternset&gt;
96 &lt;fileset dir=&quot;.&quot;&gt;
97 &lt;include name=&quot;**/*.zip&quot;/&gt;
98 &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
99 &lt;/fileset&gt;
100&lt;/unzip&gt;
101</pre></p>
102</blockquote>
103<hr>
104<p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. All rights
105Reserved.</p>
106
107</body>
108</html>
109
Note: See TracBrowser for help on using the repository browser.