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