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.

propertyset.html 4.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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>PropertySet Type</title>
  20. </head>
  21. <body>
  22. <h2><a name="propertyset">PropertySet</a></h2>
  23. <p><em>Since Apache Ant 1.6</em></p>
  24. <p>Groups a set of properties to be used by reference in a task that
  25. supports this.</p>
  26. <table border="1" cellpadding="2" cellspacing="0">
  27. <tr>
  28. <td valign="top"><b>Attribute</b></td>
  29. <td valign="top"><b>Description</b></td>
  30. <td align="center" valign="top"><b>Required</b></td>
  31. </tr>
  32. <tr>
  33. <td valign="top">dynamic</td>
  34. <td valign="top">Whether to reevaluate the set everytime the set
  35. is used. Default is &quot;<code>true</code>&quot;.</td>
  36. <td valign="top" align="center">No</td>
  37. </tr>
  38. <tr>
  39. <td valign="top">negate</td>
  40. <td valign="top">Whether to negate results. If
  41. &quot;<code>true</code>&quot;, all properties <i>not</i>
  42. selected by nested elements will be returned. Default is
  43. &quot;<code>false</code>&quot;. <em>Since Ant 1.6.2</em>
  44. </td>
  45. <td valign="top" align="center">No</td>
  46. </tr>
  47. </table>
  48. <h3>Parameters specified as nested elements</h3>
  49. <h4>propertyref</h4>
  50. <p>Selects properties from the current project to be included in the
  51. set.</p>
  52. <table border="1" cellpadding="2" cellspacing="0">
  53. <tr>
  54. <td valign="top"><b>Attribute</b></td>
  55. <td valign="top"><b>Description</b></td>
  56. <td align="center" valign="top"><b>Required</b></td>
  57. </tr>
  58. <tr>
  59. <td valign="top">name</td>
  60. <td valign="top">Select the property with the given name.</td>
  61. <td align="center" valign="top" rowspan="4">Exactly one of these.</td>
  62. </tr>
  63. <tr>
  64. <td valign="top">prefix</td>
  65. <td valign="top">Select the properties whose name starts with the
  66. given string.</td>
  67. </tr>
  68. <tr>
  69. <td valign="top">regex</td>
  70. <td valign="top">Select the properties that match the given
  71. regular expression. Similar to <a
  72. href="mapper.html#regexp-mapper">regexp type mappers</a>, this
  73. requires a supported regular expression library.</td>
  74. </tr>
  75. <tr>
  76. <td valign="top">builtin</td>
  77. <td valign="top">Selects a builtin set of properties. Valid
  78. values for this attribute are <code>all</code> for all Ant
  79. properties, <code>system</code> for the system properties and
  80. <code>commandline</code> for all properties specified on the
  81. command line when invoking Ant (plus a number of special
  82. internal Ant properties).</td>
  83. </tr>
  84. </table>
  85. <h4>propertyset</h4>
  86. <p>A <code>propertyset</code> can be used as the set union of more
  87. <code>propertyset</code>s.</p>
  88. <p>For example:</p>
  89. <blockquote><pre>
  90. &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
  91. &lt;propertyref prefix=&quot;foo&quot;/&gt;
  92. &lt;/propertyset&gt;
  93. &lt;propertyset id=&quot;properties-starting-with-bar&quot;&gt;
  94. &lt;propertyref prefix=&quot;bar&quot;/&gt;
  95. &lt;/propertyset&gt;
  96. &lt;propertyset id=&quot;my-set&quot;&gt;
  97. &lt;propertyset refid=&quot;properties-starting-with-foo&quot;/&gt;
  98. &lt;propertyset refid=&quot;properties-starting-with-bar&quot;/&gt;
  99. &lt;/propertyset&gt;
  100. </pre></blockquote>
  101. <p>collects all properties whose name starts with either
  102. &quot;foo&quot; or &quot;bar&quot; in the set named
  103. &quot;my-set&quot;.</p>
  104. <h4>mapper</h4>
  105. <p>A <a href="mapper.html">mapper</a> - at maximum one mapper can be
  106. specified. The mapper is used to change the names of the property
  107. keys, for example:
  108. <blockquote><pre>
  109. &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
  110. &lt;propertyref prefix=&quot;foo&quot;/&gt;
  111. &lt;mapper type=&quot;glob&quot; from=&quot;foo*&quot; to=&quot;bar*&quot;/&gt;
  112. &lt;/propertyset&gt;
  113. </pre></blockquote>
  114. <p>collects all properties whose name starts with &quot;foo&quot;, but
  115. changes the names to start with &quot;bar&quot; instead.</p>
  116. <p>If supplied, the nested mapper will be applied
  117. subsequent to any negation of matched properties.</p>
  118. </body>
  119. </html>