1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>Cab Task</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="cab">Cab</a></h2>
|
---|
12 | <h3>Description</h3>
|
---|
13 | <p>The cab task creates Microsoft cab archive files. It is invoked
|
---|
14 | similar to the <a href="../CoreTasks/jar.html">jar</a> or <a href="../CoreTasks/zip.html">zip</a> tasks.
|
---|
15 | This task will work on Windows using the external cabarc tool (provided by Microsoft)
|
---|
16 | which must be located in your executable path.</p>
|
---|
17 | <p>To use this task on other platforms you need to download and compile libcabinet from
|
---|
18 | <a href="http://trill.cis.fordham.edu/~barbacha/cabinet_library/">
|
---|
19 | http://trill.cis.fordham.edu/~barbacha/cabinet_library/</a>.</p>
|
---|
20 | <p>See the section on <a href="../dirtasks.html#directorybasedtasks">directory based
|
---|
21 | tasks</a>, on how the inclusion/exclusion of files works, and how to
|
---|
22 | write patterns.</p>
|
---|
23 | <p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
|
---|
24 | supports all attributes of <code><fileset></code>
|
---|
25 | (<code>dir</code> becomes <code>basedir</code>) as well as the nested
|
---|
26 | <code><include></code>, <code><exclude></code> and
|
---|
27 | <code><patternset></code> elements.</p>
|
---|
28 | <h3>Parameters</h3>
|
---|
29 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
30 | <tr>
|
---|
31 | <td valign="top"><b>Attribute</b></td>
|
---|
32 | <td valign="top"><b>Description</b></td>
|
---|
33 | <td align="center" valign="top"><b>Required</b></td>
|
---|
34 | </tr>
|
---|
35 | <tr>
|
---|
36 | <td valign="top">cabfile</td>
|
---|
37 | <td valign="top">the name of the cab file to create.</td>
|
---|
38 | <td valign="top" align="center">Yes</td>
|
---|
39 | </tr>
|
---|
40 | <tr>
|
---|
41 | <td valign="top">basedir</td>
|
---|
42 | <td valign="top">the directory to start archiving files from.</td>
|
---|
43 | <td valign="top" align="center">No</td>
|
---|
44 | </tr>
|
---|
45 | <tr>
|
---|
46 | <td valign="top">verbose</td>
|
---|
47 | <td valign="top">set to "yes" if you want to see the output from
|
---|
48 | the cabarc tool. defaults to "no".</td>
|
---|
49 | <td valign="top" align="center">No</td>
|
---|
50 | </tr>
|
---|
51 | <tr>
|
---|
52 | <td valign="top">compress</td>
|
---|
53 | <td valign="top">set to "no" to store files without compressing.
|
---|
54 | defaults to "yes".</td>
|
---|
55 | <td valign="top" align="center">No</td>
|
---|
56 | </tr>
|
---|
57 | <tr>
|
---|
58 | <td valign="top">options</td>
|
---|
59 | <td valign="top">use to set additional command-line options for
|
---|
60 | the cabarc tool. should not normally be necessary.</td>
|
---|
61 | <td valign="top" align="center">No</td>
|
---|
62 | </tr>
|
---|
63 | <tr>
|
---|
64 | <td valign="top">includes</td>
|
---|
65 | <td valign="top">comma- or space-separated list of patterns of files that
|
---|
66 | must be included. All files are included when omitted.</td>
|
---|
67 | <td valign="top" align="center">No</td>
|
---|
68 | </tr>
|
---|
69 | <tr>
|
---|
70 | <td valign="top">includesfile</td>
|
---|
71 | <td valign="top">the name of a file. Each line of this file is
|
---|
72 | taken to be an include pattern</td>
|
---|
73 | <td valign="top" align="center">No</td>
|
---|
74 | </tr>
|
---|
75 | <tr>
|
---|
76 | <td valign="top">excludes</td>
|
---|
77 | <td valign="top">comma- or space-separated list of patterns of files that
|
---|
78 | must be excluded. No files (except default excludes) are excluded
|
---|
79 | when omitted.</td>
|
---|
80 | <td valign="top" align="center">No</td>
|
---|
81 | </tr>
|
---|
82 | <tr>
|
---|
83 | <td valign="top">excludesfile</td>
|
---|
84 | <td valign="top">the name of a file. Each line of this file is
|
---|
85 | taken to be an exclude pattern</td>
|
---|
86 | <td valign="top" align="center">No</td>
|
---|
87 | </tr>
|
---|
88 | <tr>
|
---|
89 | <td valign="top">defaultexcludes</td>
|
---|
90 | <td valign="top">indicates whether default excludes should be used
|
---|
91 | or not ("yes"/"no"). Default excludes are used when omitted.</td>
|
---|
92 | <td valign="top" align="center">No</td>
|
---|
93 | </tr>
|
---|
94 | </table>
|
---|
95 | <h3>Parameters specified as nested elements</h3>
|
---|
96 | <h4>fileset</h4>
|
---|
97 |
|
---|
98 | <p>The cab task supports any number of nested <a
|
---|
99 | href="../CoreTypes/fileset.html"><code><fileset></code></a>
|
---|
100 | elements to specify the files to be included in the archive.</p>
|
---|
101 |
|
---|
102 | <h3>Examples</h3>
|
---|
103 | <blockquote><pre>
|
---|
104 | <cab cabfile="${dist}/manual.cab"
|
---|
105 | basedir="htdocs/manual"
|
---|
106 | />
|
---|
107 | </pre></blockquote>
|
---|
108 | <p>cabs all files in the htdocs/manual directory into a file called
|
---|
109 | manual.cab in the ${dist} directory.</p>
|
---|
110 | <blockquote><pre>
|
---|
111 | <cab cabfile="${dist}/manual.cab"
|
---|
112 | basedir="htdocs/manual"
|
---|
113 | excludes="mydocs/**, **/todo.html"
|
---|
114 | />
|
---|
115 | </pre></blockquote>
|
---|
116 | <p>cabs all files in the htdocs/manual directory into a file called
|
---|
117 | manual.cab in the ${dist} directory. Files in the directory mydocs,
|
---|
118 | or files with the name todo.html are excluded.</p>
|
---|
119 | <blockquote><pre>
|
---|
120 | <cab cabfile="${dist}/manual.cab"
|
---|
121 | basedir="htdocs/manual"
|
---|
122 | includes="api/**/*.html"
|
---|
123 | excludes="**/todo.html"
|
---|
124 | verbose="yes"
|
---|
125 | />
|
---|
126 | </pre></blockquote>
|
---|
127 | <p>Cab all files in the htdocs/manual directory into a file called
|
---|
128 | manual.cab in the ${dist} directory. Only html files under the
|
---|
129 | directory api are archived, and files with the name todo.html are
|
---|
130 | excluded. Output from the cabarc tool is displayed in the build
|
---|
131 | output.</p>
|
---|
132 |
|
---|
133 | <blockquote><pre>
|
---|
134 | <cab cabfile="${dist}/manual.cab"
|
---|
135 | verbose="yes">
|
---|
136 | <fileset
|
---|
137 | dir="htdocs/manual"
|
---|
138 | includes="api/**/*.html"
|
---|
139 | excludes="**/todo.html"
|
---|
140 | />
|
---|
141 | </cab>
|
---|
142 | </pre></blockquote>
|
---|
143 | <p>is equivalent to the example above.</p>
|
---|
144 |
|
---|
145 | <hr>
|
---|
146 | <p align="center">Copyright © 2000-2004 The Apache Software Foundation. All rights
|
---|
147 | Reserved.</p>
|
---|
148 |
|
---|
149 | </body>
|
---|
150 | </html>
|
---|
151 |
|
---|