You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

unzip.html 3.0 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Unzip Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="unzip">Unjar/Untar/Unwar/Unzip</a></h2>
  8. <h3>Description</h3>
  9. <p>Unzips a zip-, war-, tar- or jarfile.</p>
  10. <p>For JDK 1.1 &quot;last modified time&quot; field is set to current time instead of being
  11. carried from the archive file.</p>
  12. <p><a href="../CoreTypes/patternset.html">PatternSet</a>s are used to select files to extract
  13. <I>from</I> the archive. If no patternset is used, all files are extracted.
  14. </p>
  15. <p><a href="../CoreTypes/fileset.html">FileSet</a>s may be used used to select archived files
  16. to perform unarchival upon.
  17. </p>
  18. <p>File permissions will not be restored on extracted files.</p>
  19. <p>The untar task recognizes the long pathname entries used by GNU tar.<p>
  20. <h3>Parameters</h3>
  21. <table border="1" cellpadding="2" cellspacing="0">
  22. <tr>
  23. <td valign="top"><b>Attribute</b></td>
  24. <td valign="top"><b>Description</b></td>
  25. <td align="center" valign="top"><b>Required</b></td>
  26. </tr>
  27. <tr>
  28. <td valign="top">src</td>
  29. <td valign="top">archive file to expand.</td>
  30. <td align="center" valign="top">Yes, if filesets are not used.</td>
  31. </tr>
  32. <tr>
  33. <td valign="top">dest</td>
  34. <td valign="top">directory where to store the expanded files.</td>
  35. <td align="center" valign="top">Yes</td>
  36. </tr>
  37. <tr>
  38. <td valign="top">overwrite</td>
  39. <td valign="top">Overwrite files, even if they are newer than the
  40. corresponding entries in the archive (true or false, default is
  41. true).</td>
  42. <td align="center" valign="top">No</td>
  43. </tr>
  44. <tr>
  45. <td valign="top">compression</td>
  46. <td valign="top">compression method for untar. Allowable values are
  47. &quot;none&quot;, &quot;gzip&quot; and &quot;bzip2&quot;. Default is
  48. &quot;none&quot;.</td>
  49. <td valign="top" align="center">No</td>
  50. </tr>
  51. </table>
  52. <h3>Examples</h3>
  53. <blockquote>
  54. <p><code>&lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot; dest=&quot;${tools.home}&quot;/&gt;</code></p>
  55. </blockquote>
  56. <blockquote>
  57. <p><code>
  58. &lt;gunzip src=&quot;tools.tar.gz&quot;/&gt;<br>
  59. &lt;untar src=&quot;tools.tar&quot; dest=&quot;${tools.home}&quot;/&gt;
  60. </code></p>
  61. </blockquote>
  62. <blockquote>
  63. <p><pre>
  64. &lt;unzip src=&quot;${tomcat_src}/tools-src.zip&quot;
  65. dest=&quot;${tools.home}&quot;&gt;
  66. &lt;patternset&gt;
  67. &lt;include name=&quot;**/*.java&quot;/&gt;
  68. &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
  69. &lt;/patternset&gt;
  70. &lt;/unzip&gt;
  71. </pre></p>
  72. </blockquote>
  73. <blockquote>
  74. <p><pre>
  75. &lt;unzip dest=&quot;${tools.home}&quot;&gt;
  76. &lt;patternset&gt;
  77. &lt;include name=&quot;**/*.java&quot;/&gt;
  78. &lt;exclude name=&quot;**/Test*.java&quot;/&gt;
  79. &lt;/patternset&gt;
  80. &lt;fileset dir=&quot;.&quot;&gt;
  81. &lt;include name=&quot;**/*.zip&quot;/&gt;
  82. &lt;exclude name=&quot;**/tmp*.zip&quot;/&gt;
  83. &lt;/fileset&gt;
  84. &lt;/unzip&gt;
  85. </pre></p>
  86. </blockquote>
  87. <hr>
  88. <p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All rights
  89. Reserved.</p>
  90. </body>
  91. </html>