You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

jarlib-available.html 4.8 KiB

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