source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.6.2/manual/OptionalTasks/jarlib-available.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 4.1 KB
Line 
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.
14If the extension is present then a property is set.</p>
15
16<p>Note that this task
17works 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
20Java2 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">
23http://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
53sets 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 &lt;jarlib-available property=&quot;myext.present&quot; file=&quot;myfile.jar&quot;&gt;
63 &lt;extension
64 extensionName=&quot;org.apache.tools.ant&quot;
65 specificationVersion=&quot;1.4.9&quot;
66 specificationVendor=&quot;Apache Software Foundation&quot;/&gt;
67 &lt;/jarlib-available&gt;
68</pre>
69
70<p><b>Search for extension in single file refencing external Extension</b></p>
71<pre>
72 &lt;extension id=&quot;myext&quot;
73 extensionName=&quot;org.apache.tools.ant&quot;
74 specificationVersion=&quot;1.4.9&quot;
75 specificationVendor=&quot;Apache Software Foundation&quot;/&gt;
76
77 &lt;jarlib-available property=&quot;myext.present&quot; file=&quot;myfile.jar&quot;&gt;
78 &lt;extension refid=&quot;myext&quot;/&gt;
79 &lt;/jarlib-available&gt;
80</pre>
81<p><b>Search for extension in fileset</b></p>
82<pre>
83 &lt;extension id=&quot;myext&quot;
84 extensionName=&quot;org.apache.tools.ant&quot;
85 specificationVersion=&quot;1.4.9&quot;
86 specificationVendor=&quot;Apache Software Foundation&quot;/&gt;
87
88 &lt;jarlib-available property=&quot;myext.present&quot;&gt;
89 &lt;extension refid=&quot;myext&quot;/&gt;
90 &lt;fileset dir="lib"&gt;
91 &lt;include name="*.jar"/&gt;
92 &lt;/fileset&gt;
93 &lt;/jarlib-available&gt;
94</pre>
95<p><b>Search for extension in extensionSet</b></p>
96<pre>
97 &lt;extension id=&quot;myext&quot;
98 extensionName=&quot;org.apache.tools.ant&quot;
99 specificationVersion=&quot;1.4.9&quot;
100 specificationVendor=&quot;Apache Software Foundation&quot;/&gt;
101
102 &lt;jarlib-available property=&quot;myext.present&quot;&gt;
103 &lt;extension refid=&quot;myext&quot;/&gt;
104 &lt;extensionSet id=&quot;exts3&quot;&gt;
105 &lt;libfileset
106 includeUrl=&quot;false&quot;
107 includeImpl=&quot;true&quot;
108 dir=&quot;lib&quot;&gt;
109 &lt;include name=&quot;*.jar&quot;/&gt;
110 &lt;/libfileset&gt;
111 &lt;/extensionSet&gt;
112 &lt;/jarlib-available&gt;
113</pre>
114
115<hr><p align="center">Copyright &copy; 2002,2004 The Apache Software Foundation.
116All rights Reserved.</p>
117
118</body>
119</html>
120
Note: See TracBrowser for help on using the repository browser.