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.0 KiB

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