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.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <html lang="en">
  17. <head>
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>PropertySet Type</title>
  20. </head>
  21. <body>
  22. <h2 id="propertyset">PropertySet</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 supports this.</p>
  25. <table class="attr">
  26. <tr>
  27. <th scope="col">Attribute</th>
  28. <th scope="col">Description</th>
  29. <th scope="col">Required</th>
  30. </tr>
  31. <tr>
  32. <td>dynamic</td>
  33. <td>Whether to reevaluate the set every time the set is used.</td>
  34. <td>No; default is <q>true</q></td>
  35. </tr>
  36. <tr>
  37. <td>negate</td>
  38. <td>Whether to negate results. If <q>true</q>, all properties <em>not</em> selected by
  39. nested elements will be returned. <em>Since Ant 1.6.2</em>
  40. </td>
  41. <td>No; default is <q>false</q></td>
  42. </tr>
  43. </table>
  44. <h3>Parameters specified as nested elements</h3>
  45. <h4>propertyref</h4>
  46. <p>Selects properties from the current project to be included in the set.</p>
  47. <table class="attr">
  48. <tr>
  49. <th scope="col">Attribute</th>
  50. <th scope="col">Description</th>
  51. <th scope="col">Required</th>
  52. </tr>
  53. <tr>
  54. <td>name</td>
  55. <td>Select the property with the given name.</td>
  56. <td rowspan="4">Exactly one of these</td>
  57. </tr>
  58. <tr>
  59. <td>prefix</td>
  60. <td class="left">Select the properties whose name starts with the given string.</td>
  61. </tr>
  62. <tr>
  63. <td>regex</td>
  64. <td class="left">Select the properties that match the given regular expression. Similar
  65. to <a href="mapper.html#regexp-mapper">regexp type mappers</a>, this requires a supported
  66. regular expression library.</td>
  67. </tr>
  68. <tr>
  69. <td>builtin</td>
  70. <td class="left">Selects a builtin set of properties. Valid values for this attribute
  71. are <q>all</q> for all Ant properties, <q>system</q> for the system properties and
  72. <q>commandline</q> for all properties specified on the
  73. command line when invoking Ant (plus a number of special
  74. internal Ant properties).</td>
  75. </tr>
  76. </table>
  77. <h4>propertyset</h4>
  78. <p>A <code>propertyset</code> can be used as the set union of
  79. more <code>propertyset</code>s.</p>
  80. <p>For example:</p>
  81. <pre>
  82. &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
  83. &lt;propertyref prefix=&quot;foo&quot;/&gt;
  84. &lt;/propertyset&gt;
  85. &lt;propertyset id=&quot;properties-starting-with-bar&quot;&gt;
  86. &lt;propertyref prefix=&quot;bar&quot;/&gt;
  87. &lt;/propertyset&gt;
  88. &lt;propertyset id=&quot;my-set&quot;&gt;
  89. &lt;propertyset refid=&quot;properties-starting-with-foo&quot;/&gt;
  90. &lt;propertyset refid=&quot;properties-starting-with-bar&quot;/&gt;
  91. &lt;/propertyset&gt;
  92. </pre>
  93. <p>collects all properties whose name starts with either <q>foo</q> or <q>bar</q> in the set
  94. named <q>my-set</q>.</p>
  95. <h4>mapper</h4>
  96. <p>A <a href="mapper.html">mapper</a>&mdash;at maximum one mapper can be specified. The mapper
  97. is used to change the names of the property keys, for example:
  98. <pre>
  99. &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
  100. &lt;propertyref prefix=&quot;foo&quot;/&gt;
  101. &lt;mapper type=&quot;glob&quot; from=&quot;foo*&quot; to=&quot;bar*&quot;/&gt;
  102. &lt;/propertyset&gt;
  103. </pre>
  104. <p>collects all properties whose name starts with <q>foo</q>, but changes the names to start
  105. with <q>bar</q> instead.</p>
  106. <p>If supplied, the nested mapper will be applied subsequent to any negation of matched
  107. properties.</p>
  108. </body>
  109. </html>