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>jarlib-available Task</title>
|
---|
23 | </head>
|
---|
24 |
|
---|
25 | <body>
|
---|
26 |
|
---|
27 | <h2><a name="jarlib-available">jarlib-available</a></h2>
|
---|
28 | <h3>Description</h3>
|
---|
29 | <p>Check whether an extension is present in a fileset or an extensionSet.
|
---|
30 | If the extension is present then a property is set.</p>
|
---|
31 |
|
---|
32 | <p>Note that this task
|
---|
33 | works with extensions as defined by the "Optional Package" specification.
|
---|
34 | For more information about optional packages, see the document
|
---|
35 | <em>Optional Package Versioning</em> in the documentation bundle for your
|
---|
36 | Java2 Standard Edition package, in file
|
---|
37 | <code>guide/extensions/versioning.html</code> or online at
|
---|
38 | <a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html">
|
---|
39 | http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html</a>.</p>
|
---|
40 | <p>See the Extension and ExtensionSet documentation for further details</p>
|
---|
41 |
|
---|
42 | <h3>Parameters</h3>
|
---|
43 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
44 | <tr>
|
---|
45 | <td valign="top"><b>Attribute</b></td>
|
---|
46 | <td valign="top"><b>Description</b></td>
|
---|
47 | <td align="center" valign="top"><b>Required</b></td>
|
---|
48 | </tr>
|
---|
49 | <tr>
|
---|
50 | <td valign="top">property</td>
|
---|
51 | <td valign="top">The name of property to set if extensions is available.</td>
|
---|
52 | <td valign="top" align="center">Yes</td>
|
---|
53 | </tr>
|
---|
54 | <tr>
|
---|
55 | <td valign="top">file</td>
|
---|
56 | <td valign="top">The file to check for extension</td>
|
---|
57 | <td valign="top" align="center">No, one of file, nested
|
---|
58 | ExtensionSet or nested fileset must be present.</td>
|
---|
59 | </tr>
|
---|
60 | </table>
|
---|
61 | <h3>Parameters specified as nested elements</h3>
|
---|
62 |
|
---|
63 | <h4>extension</h4>
|
---|
64 | <p><a href="../OptionalTypes/extension.html">Extension</a> the extension
|
---|
65 | to search for.</p>
|
---|
66 |
|
---|
67 | <h4>fileset</h4>
|
---|
68 | <p><a href="../CoreTypes/fileset.html">FileSet</a>s are used to select
|
---|
69 | sets of files to check for extension.</p>
|
---|
70 |
|
---|
71 | <h4>extensionSet</h4>
|
---|
72 | <p><a href="../OptionalTypes/extensionset.html">ExtensionSet</a>s is the set
|
---|
73 | of extensions to search for extension in.</p>
|
---|
74 |
|
---|
75 | <h3>Examples</h3>
|
---|
76 | <p><b>Search for extension in single file</b></p>
|
---|
77 | <pre>
|
---|
78 | <jarlib-available property="myext.present" file="myfile.jar">
|
---|
79 | <extension
|
---|
80 | extensionName="org.apache.tools.ant"
|
---|
81 | specificationVersion="1.4.9"
|
---|
82 | specificationVendor="Apache Software Foundation"/>
|
---|
83 | </jarlib-available>
|
---|
84 | </pre>
|
---|
85 |
|
---|
86 | <p><b>Search for extension in single file referencing external Extension</b></p>
|
---|
87 | <pre>
|
---|
88 | <extension id="myext"
|
---|
89 | extensionName="org.apache.tools.ant"
|
---|
90 | specificationVersion="1.4.9"
|
---|
91 | specificationVendor="Apache Software Foundation"/>
|
---|
92 |
|
---|
93 | <jarlib-available property="myext.present" file="myfile.jar">
|
---|
94 | <extension refid="myext"/>
|
---|
95 | </jarlib-available>
|
---|
96 | </pre>
|
---|
97 | <p><b>Search for extension in fileset</b></p>
|
---|
98 | <pre>
|
---|
99 | <extension id="myext"
|
---|
100 | extensionName="org.apache.tools.ant"
|
---|
101 | specificationVersion="1.4.9"
|
---|
102 | specificationVendor="Apache Software Foundation"/>
|
---|
103 |
|
---|
104 | <jarlib-available property="myext.present">
|
---|
105 | <extension refid="myext"/>
|
---|
106 | <fileset dir="lib">
|
---|
107 | <include name="*.jar"/>
|
---|
108 | </fileset>
|
---|
109 | </jarlib-available>
|
---|
110 | </pre>
|
---|
111 | <p><b>Search for extension in extensionSet</b></p>
|
---|
112 | <pre>
|
---|
113 | <extension id="myext"
|
---|
114 | extensionName="org.apache.tools.ant"
|
---|
115 | specificationVersion="1.4.9"
|
---|
116 | specificationVendor="Apache Software Foundation"/>
|
---|
117 |
|
---|
118 | <jarlib-available property="myext.present">
|
---|
119 | <extension refid="myext"/>
|
---|
120 | <extensionSet id="exts3">
|
---|
121 | <libfileset
|
---|
122 | includeUrl="false"
|
---|
123 | includeImpl="true"
|
---|
124 | dir="lib">
|
---|
125 | <include name="*.jar"/>
|
---|
126 | </libfileset>
|
---|
127 | </extensionSet>
|
---|
128 | </jarlib-available>
|
---|
129 | </pre>
|
---|
130 |
|
---|
131 |
|
---|
132 |
|
---|
133 | </body>
|
---|
134 | </html>
|
---|
135 |
|
---|