source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTypes/zipfileset.html@ 14982

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

initial import of LiRK3

File size: 4.0 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4 <meta http-equiv="Content-Language" content="en-us">
5 <title>ZipFileSet Type</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8<body>
9<h2><a name="fileset">ZipFileSet</a></h2>
10<p>A <code>&lt;zipfileset&gt;</code> is a special form of a <code>&lt;<a
11 href="fileset.html">fileset</a>&gt;</code> which can behave in 2
12different ways : <br>
13</p>
14<ul>
15 <li>When the <span style="font-style: italic;">src</span> attribute
16is used, the zipfileset is populated with zip entries found in the file <span
17 style="font-style: italic;">src</span>.<br>
18 </li>
19 <li>When the <span style="font-style: italic;">dir</span> attribute
20is used, the zipfileset is populated with filesystem files found under <span
21 style="font-style: italic;">dir</span>.<br>
22 </li>
23</ul>
24<p><code>&lt;zipfileset&gt;</code> supports all attributes of <code>&lt;<a
25 href="fileset.html">fileset</a>&gt;</code>
26in addition to those listed below.<br>
27</p>
28<p>Since Ant 1.6, a zipfileset can be defined with the <span
29 style="font-style: italic;">id </span>attribute and referred to with
30the <span style="font-style: italic;">refid</span> attribute.<br>
31</p>
32<h3>Parameters</h3>
33<table border="1" cellpadding="2" cellspacing="0">
34 <tbody>
35 <tr>
36 <td valign="top"><b>Attribute</b></td>
37 <td valign="top"><b>Description</b></td>
38 <td valign="top" align="center"><b>Required</b></td>
39 </tr>
40 <tr>
41 <td valign="top">prefix</td>
42 <td valign="top">all files in the fileset are prefixed with that
43path in the archive.</td>
44 <td align="center" valign="top">No</td>
45 </tr>
46 <tr>
47 <td valign="top">fullpath</td>
48 <td valign="top">the file described by the fileset is placed at
49that exact location in the archive.</td>
50 <td align="center" valign="top">No</td>
51 </tr>
52 <tr>
53 <td valign="top">src</td>
54 <td valign="top">may be used in place of the <i>dir</i> attribute
55 to specify a zip file whose contents will be extracted and included
56in the archive.</td>
57 <td align="center" valign="top">No</td>
58 </tr>
59 <tr>
60 <td valign="top">filemode</td>
61 <td valign="top">A 3 digit octal string, specify the user, group
62and other modes in the standard Unix fashion. Only applies to
63plain files. Default is 644. <em>since Ant 1.5.2</em>.</td>
64 <td align="center" valign="top">No</td>
65 </tr>
66 <tr>
67 <td valign="top">dirmode</td>
68 <td valign="top">A 3 digit octal string, specify the user, group
69and other modes in the standard Unix fashion. Only applies to
70directories. Default is 755. <em>since Ant 1.5.2</em>.</td>
71 <td align="center" valign="top">No</td>
72 </tr>
73 </tbody>
74</table>
75<p>The <i>fullpath</i> attribute can only be set for filesets that
76represent a single file. The <i>prefix</i> and <i>fullpath</i>
77attributes cannot both be set on the same fileset.</p>
78<p>When using the <i>src</i> attribute, include and exclude patterns
79may be used to specify a subset of the zip file for inclusion in the
80archive as with the <i>dir</i> attribute.</p>
81<h4>Examples</h4>
82<blockquote>
83 <pre> &lt;zip destfile="${dist}/manual.zip"&gt;<br> &lt;zipfileset dir="htdocs/manual" prefix="docs/user-guide"/&gt;<br> &lt;zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/&gt;<br> &lt;zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/&gt;<br> &lt;/zip&gt;<br></pre>
84 <p>zips all files in the <code>htdocs/manual</code> directory into
85the <code>docs/user-guide</code> directory in the archive, adds the
86file <code>ChangeLog27.txt</code> in the current directory as <code>docs/ChangeLog.txt</code>,
87and includes all the html files in <code>examples.zip</code> under <code>docs/examples</code>.
88The archive might end up containing the files:</p>
89 <code> docs/user-guide/html/index.html<br>
90docs/ChangeLog.txt<br>
91docs/examples/index.html<br>
92 </code></blockquote>
93<hr>
94<p align="center">Copyright &copy; 2003-2004 The Apache Software Foundation. All
95rights Reserved.</p>
96</body>
97</html>
Note: See TracBrowser for help on using the repository browser.