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