Debian Codegraph @

manual/Types/propertyset.html

raw
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
10 https://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 -->
18 <html lang="en">
19
20 <head>
21 <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
22 <title>PropertySet Type</title>
23 </head>
24
25 <body>
26
27 <h2 id="propertyset">PropertySet</h2>
28 <p><em>Since Apache Ant 1.6</em></p>
29
30 <p>Groups a set of properties to be used by reference in a task that supports this.</p>
31
32 <table class="attr">
33 <tr>
34 <th scope="col">Attribute</th>
35 <th scope="col">Description</th>
36 <th scope="col">Required</th>
37 </tr>
38 <tr>
39 <td>dynamic</td>
40 <td>Whether to reevaluate the set every time the set is used.</td>
41 <td>No; default is <q>true</q></td>
42 </tr>
43 <tr>
44 <td>negate</td>
45 <td>Whether to negate results. If <q>true</q>, all properties <em>not</em> selected by
46 nested elements will be returned. <em>Since Ant 1.6.2</em>
47 </td>
48 <td>No; default is <q>false</q></td>
49 </tr>
50 <tr>
51 <td>refid</td>
52 <td>Makes this <code>propertyset</code>
53 a <a href="../using.html#references">reference</a> to
54 a <code>propertyset</code> defined elsewhere. If specified no
55 other attributes or nested elements are allowed.</td>
56 <td>No</td>
57 </tr>
58 </table>
59 <h3>Parameters specified as nested elements</h3>
60
61 <h4>propertyref</h4>
62
63 <p>Selects properties from the current project to be included in the set.</p>
64
65 <table class="attr">
66 <tr>
67 <th scope="col">Attribute</th>
68 <th scope="col">Description</th>
69 <th scope="col">Required</th>
70 </tr>
71 <tr>
72 <td>name</td>
73 <td>Select the property with the given name.</td>
74 <td rowspan="4">Exactly one of these</td>
75 </tr>
76 <tr>
77 <td>prefix</td>
78 <td class="left">Select the properties whose name starts with the given string.</td>
79 </tr>
80 <tr>
81 <td>regex</td>
82 <td class="left">Select the properties that match the given regular expression. Similar
83 to <a href="mapper.html#regexp-mapper">regexp type mappers</a>, this requires a supported
84 regular expression library.</td>
85 </tr>
86 <tr>
87 <td>builtin</td>
88 <td class="left">Selects a builtin set of properties. Valid values for this attribute
89 are <q>all</q> for all Ant properties, <q>system</q> for the system properties and
90 <q>commandline</q> for all properties specified on the
91 command line when invoking Ant (plus a number of special
92 internal Ant properties).</td>
93 </tr>
94 </table>
95
96 <h4>propertyset</h4>
97
98 <p>A <code>propertyset</code> can be used as the set union of
99 more <code>propertyset</code>s.</p>
100
101 <p>For example:</p>
102
103 <pre>
104 &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
105 &lt;propertyref prefix=&quot;foo&quot;/&gt;
106 &lt;/propertyset&gt;
107 &lt;propertyset id=&quot;properties-starting-with-bar&quot;&gt;
108 &lt;propertyref prefix=&quot;bar&quot;/&gt;
109 &lt;/propertyset&gt;
110 &lt;propertyset id=&quot;my-set&quot;&gt;
111 &lt;propertyset refid=&quot;properties-starting-with-foo&quot;/&gt;
112 &lt;propertyset refid=&quot;properties-starting-with-bar&quot;/&gt;
113 &lt;/propertyset&gt;
114 </pre>
115
116 <p>collects all properties whose name starts with either <q>foo</q> or <q>bar</q> in the set
117 named <q>my-set</q>.</p>
118
119 <h4>mapper</h4>
120
121 <p>A <a href="mapper.html">mapper</a>&mdash;at maximum one mapper can be specified. The mapper
122 is used to change the names of the property keys, for example:
123
124 <pre>
125 &lt;propertyset id=&quot;properties-starting-with-foo&quot;&gt;
126 &lt;propertyref prefix=&quot;foo&quot;/&gt;
127 &lt;mapper type=&quot;glob&quot; from=&quot;foo*&quot; to=&quot;bar*&quot;/&gt;
128 &lt;/propertyset&gt;
129 </pre>
130
131 <p>collects all properties whose name starts with <q>foo</q>, but changes the names to start
132 with <q>bar</q> instead.</p>
133
134 <p>If supplied, the nested mapper will be applied subsequent to any negation of matched
135 properties.</p>
136
137 </body>
138 </html>