Lines 9-23
Link Here
|
9 |
|
9 |
|
10 |
<h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2> |
10 |
<h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2> |
11 |
<h3>Description</h3> |
11 |
<h3>Description</h3> |
12 |
<p>Unzips a zip-, war-, tar- or jarfile.</p> |
12 |
<p>Unzips zip-, war-, tar- or jarfile(s).</p> |
13 |
<p>For JDK 1.1 "last modified time" field is set to current time instead of being |
13 |
<p>For JDK 1.1 "last modified time" field is set to current time instead of being |
14 |
carried from the archive file.</p> |
14 |
carried from the archive file.</p> |
15 |
<p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select files to extract |
|
|
16 |
<I>from</I> the archive. If no patternset is used, all files are extracted. |
17 |
</p> |
18 |
<p><a href="../CoreTypes/fileset.html">FileSet</a>s may be used used to select archived files |
19 |
to perform unarchival upon. |
20 |
</p> |
21 |
<p>File permissions will not be restored on extracted files.</p> |
15 |
<p>File permissions will not be restored on extracted files.</p> |
22 |
<p>The untar task recognizes the long pathname entries used by GNU tar.<p> |
16 |
<p>The untar task recognizes the long pathname entries used by GNU tar.<p> |
23 |
<h3>Parameters</h3> |
17 |
<h3>Parameters</h3> |
Lines 53-68
Link Here
|
53 |
</tr> |
47 |
</tr> |
54 |
|
48 |
|
55 |
</table> |
49 |
</table> |
|
|
50 |
<h3>Parameters specified as nested elements</h3> |
51 |
|
52 |
<h4>fileset</h4> |
53 |
<p><a href="../CoreTypes/fileset.html">FileSet</a>s may be used used to select archived files |
54 |
to perform unarchival upon. |
55 |
</p> |
56 |
|
57 |
<h4>patternset</h4> |
58 |
<p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select files to extract |
59 |
<I>from</I> the archive. If no patternset is used, all files are extracted. |
60 |
</p> |
61 |
|
62 |
<h4>mapper</h4> |
63 |
<p>A nested <a href="../CoreTypes/mapper.html">mapper</a> element can be used |
64 |
to map archive file names to extraction directories. The mapper will map the |
65 |
src or fileset file names to a directory name that is appended to dest to |
66 |
create the final destination directory. New directories will be created if they |
67 |
don't already exist. Unmatched archives will not be extracted. If no mapper is |
68 |
specified all of the archive files will be extracted into the single dest |
69 |
directory.</p> |
70 |
|
56 |
<h3>Examples</h3> |
71 |
<h3>Examples</h3> |
57 |
<blockquote> |
72 |
<blockquote> |
58 |
<p><code><unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"/></code></p> |
73 |
<p><code><unzip src="${tomcat_src}/tools-src.zip" dest="${tools.home}"/></code></p> |
59 |
</blockquote> |
74 |
</blockquote> |
|
|
75 |
<p>Unzips ${tomcat_src}/tools-src.zip into the ${tools.home} directory</p> |
60 |
<blockquote> |
76 |
<blockquote> |
61 |
<p><code> |
77 |
<p><code> |
62 |
<gunzip src="tools.tar.gz"/><br> |
78 |
<gunzip src="tools.tar.gz"/><br> |
63 |
<untar src="tools.tar" dest="${tools.home}"/> |
79 |
<untar src="tools.tar" dest="${tools.home}"/> |
64 |
</code></p> |
80 |
</code></p> |
65 |
</blockquote> |
81 |
</blockquote> |
|
|
82 |
<p>Gunzips the tools.tar.gz file into tools.tar and untars that into the |
83 |
${tools.home} directory</p> |
66 |
<blockquote> |
84 |
<blockquote> |
67 |
<p><pre> |
85 |
<p><pre> |
68 |
<unzip src="${tomcat_src}/tools-src.zip" |
86 |
<unzip src="${tomcat_src}/tools-src.zip" |
Lines 74-79
Link Here
|
74 |
</unzip> |
92 |
</unzip> |
75 |
</pre></p> |
93 |
</pre></p> |
76 |
</blockquote> |
94 |
</blockquote> |
|
|
95 |
<p>Unzips any file in the ${tomcat_src}/tools-src.zip archive that ends with |
96 |
".java", unless the file name starts with "Test", into the ${tools.home} |
97 |
directory</p> |
77 |
<blockquote> |
98 |
<blockquote> |
78 |
<p><pre> |
99 |
<p><pre> |
79 |
<unzip dest="${tools.home}"> |
100 |
<unzip dest="${tools.home}"> |
Lines 88-95
Link Here
|
88 |
</unzip> |
109 |
</unzip> |
89 |
</pre></p> |
110 |
</pre></p> |
90 |
</blockquote> |
111 |
</blockquote> |
|
|
112 |
<p>Unzips any file that ends with ".java", unless the file name starts with |
113 |
"Test", into the ${tools.home} directory from any archive in the current |
114 |
directory or subdirectories that ends in ".zip", but doesn't start with |
115 |
"tmp".</p> |
116 |
<blockquote> |
117 |
<p><pre><unjar dest="${dir.preverified}"> |
118 |
<fileset dir="${dir.src}"> |
119 |
<include name="*.jar" /> |
120 |
<include name="*.zip" /> |
121 |
</fileset> |
122 |
<mapper type="regexp" from="^(.*)\.(jar|zip)$$" to="\1/" /> |
123 |
</unjar> |
124 |
</pre></p> |
125 |
</blockquote> |
126 |
|
127 |
<p>Unpacks all files ending in .jar or .zip in the ${dir.src} directory and puts |
128 |
the contents of <em>each</em> into a subdirectory of the ${dir.preverified} |
129 |
directory. Each subdirectory is named the same name as the original archive file |
130 |
that its' contents came from, but without the trailing .jar or .zip. For |
131 |
example, the contents of <code>src/purifier.zip</code> and |
132 |
<code>src/ant.jar</code> will be extracted to <code>preverified/purifier/</code> |
133 |
and <code>preverified/ant/</code> directories respectively.</p> |
134 |
|
91 |
<hr> |
135 |
<hr> |
92 |
<p align="center">Copyright © 2000-2002 Apache Software Foundation. All rights |
136 |
<p align="center">Copyright © 2000-2003 Apache Software Foundation. All rights |
93 |
Reserved.</p> |
137 |
Reserved.</p> |
94 |
|
138 |
|
95 |
</body> |
139 |
</body> |