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.

antversion.html 3.2 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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>Antversion Task</title>
  20. </head>
  21. <body>
  22. <h2><a name="antversion">Antversion</a></h2>
  23. <h3>Description</h3>
  24. <p>
  25. Stores the Ant version (when used as task) or checks for a specific Ant version
  26. (when used as condition).
  27. <b>Since Ant 1.7.0</b>
  28. </p>
  29. <table border="1" cellpadding="2" cellspacing="0">
  30. <tr>
  31. <td valign="top"><b>Attribute</b></td>
  32. <td valign="top"><b>Description</b></td>
  33. <td align="center" valign="top"><b>Required (Task)</b></td>
  34. <td align="center" valign="top"><b>Required (Condition)</b></td>
  35. </tr>
  36. <tr>
  37. <td valign="top">atleast</td>
  38. <td valign="top">The version that this at least.
  39. The format is major.minor.point.</td>
  40. <td valign="top" align="center">No</td>
  41. <td valign="top" rowspan="2" align="center">One of these.</td>
  42. </tr>
  43. <tr>
  44. <td valign="top">exactly</td>
  45. <td valign="top">The version that this ant is exactly.
  46. The format is <tt>major.minor.point</tt>.</td>
  47. <td valign="top" align="center">No</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">property</td>
  51. <td valign="top">The name of the property to set.</td>
  52. <td valign="top" align="center">Yes</td>
  53. <td valign="top" align="center">No (ignored)</td>
  54. </tr>
  55. </table>
  56. <h3>Examples</h3>
  57. <blockquote><pre>
  58. &lt;antversion property=&quot;antversion&quot;/&gt;
  59. </pre></blockquote>
  60. <p>Stores the current Ant version in the property <i>antversion</i>.</p>
  61. <blockquote><pre>
  62. &lt;antversion property=&quot;antversion&quot; atleast=&quot;1.6&quot;/&gt;
  63. </pre></blockquote>
  64. <p>Stores the Ant version in the property <i>antversion</i> if the current Ant version is 1.6.0
  65. or higher. Otherwise the property remains unset.</p>
  66. <blockquote><pre>
  67. &lt;antversion property=&quot;ant-is-exact-7&quot; exactly=&quot;1.7.0&quot;/&gt;
  68. </pre></blockquote>
  69. <p>Sets the property <i>ant-is-exact-7</i> if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0
  70. would match.</p>
  71. <blockquote><pre>
  72. &lt;condition property=&quot;Ant17isOnline&quot;&gt;
  73. &lt;and&gt;
  74. &lt;antversion exactly=&quot;1.7.0&quot;/&gt;
  75. &lt;http url=&quot;http://ant.apache.org&quot;/&gt;
  76. &lt;/and&gt;
  77. &lt;/condition&gt;
  78. </pre></blockquote>
  79. <p>Sets <i>Ant17isOnline</i> if Ant 1.7.0 is running and can get a non-error-response from
  80. the Ant homepage.</p>
  81. </body>
  82. </html>