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><zipfileset></code> is a special form of a <code><<a
|
---|
11 | href="fileset.html">fileset</a>></code> which can behave in 2
|
---|
12 | different ways : <br>
|
---|
13 | </p>
|
---|
14 | <ul>
|
---|
15 | <li>When the <span style="font-style: italic;">src</span> attribute
|
---|
16 | is 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
|
---|
20 | is 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><zipfileset></code> supports all attributes of <code><<a
|
---|
25 | href="fileset.html">fileset</a>></code>
|
---|
26 | in 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
|
---|
30 | the <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
|
---|
43 | path 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
|
---|
49 | that 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
|
---|
56 | in 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
|
---|
62 | and other modes in the standard Unix fashion. Only applies to
|
---|
63 | plain 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
|
---|
69 | and other modes in the standard Unix fashion. Only applies to
|
---|
70 | directories. 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
|
---|
76 | represent a single file. The <i>prefix</i> and <i>fullpath</i>
|
---|
77 | attributes cannot both be set on the same fileset.</p>
|
---|
78 | <p>When using the <i>src</i> attribute, include and exclude patterns
|
---|
79 | may be used to specify a subset of the zip file for inclusion in the
|
---|
80 | archive as with the <i>dir</i> attribute.</p>
|
---|
81 | <h4>Examples</h4>
|
---|
82 | <blockquote>
|
---|
83 | <pre> <zip destfile="${dist}/manual.zip"><br> <zipfileset dir="htdocs/manual" prefix="docs/user-guide"/><br> <zipfileset dir="." includes="ChangeLog27.txt" fullpath="docs/ChangeLog.txt"/><br> <zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/><br> </zip><br></pre>
|
---|
84 | <p>zips all files in the <code>htdocs/manual</code> directory into
|
---|
85 | the <code>docs/user-guide</code> directory in the archive, adds the
|
---|
86 | file <code>ChangeLog27.txt</code> in the current directory as <code>docs/ChangeLog.txt</code>,
|
---|
87 | and includes all the html files in <code>examples.zip</code> under <code>docs/examples</code>.
|
---|
88 | The archive might end up containing the files:</p>
|
---|
89 | <code> docs/user-guide/html/index.html<br>
|
---|
90 | docs/ChangeLog.txt<br>
|
---|
91 | docs/examples/index.html<br>
|
---|
92 | </code></blockquote>
|
---|
93 | <hr>
|
---|
94 | <p align="center">Copyright © 2003-2004 The Apache Software Foundation. All
|
---|
95 | rights Reserved.</p>
|
---|
96 | </body>
|
---|
97 | </html>
|
---|