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.

augment.html 2.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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>Augment Task</title>
  20. </head>
  21. <body>
  22. <h2>Augment</h2>
  23. <p><em>Since Apache Ant 1.8.1</em></p>
  24. <h3>Description</h3>
  25. <p>Modify an existing reference by adding nested elements or (re-)assigning properties mapped as XML
  26. attributes. This is an unusual task that makes use of Ant's internal processing mechanisms to reload
  27. a previously declared reference by means of the <var>id</var> attribute, then treats the
  28. declared <code>augment</code> element as though it were the original element.</p>
  29. <h3>Parameters</h3>
  30. <table class="attr">
  31. <tr>
  32. <th scope="col">Attribute</th>
  33. <th scope="col">Description</th>
  34. <th scope="col">Required</th>
  35. </tr>
  36. <tr>
  37. <td>id</td>
  38. <td>The <var>id</var> of the reference to augment. If no such reference has been declared
  39. a <code>BuildException</code> is thrown.</td>
  40. <td>Yes</td>
  41. </tr>
  42. </table>
  43. <p>Additional permissible attributes are dependent on the reference to be modified.</p>
  44. <h3>Parameters specified as nested elements</h3>
  45. <p>Permissible nested elements are dependent on the reference to be modified.</p>
  46. <h3>Examples</h3>
  47. <p>Given</p>
  48. <pre>&lt;fileset id="input-fs" dir="${basedir}"/&gt;</pre>
  49. <p>invocation</p>
  50. <pre>&lt;augment id="input-fs" excludes="foo"/&gt;</pre>
  51. <p>modifies the <var>excludes</var> attribute of <samp>input-fs</samp>, whereas</p>
  52. <pre>
  53. &lt;augment id="input-fs"&gt;
  54. &lt;filename name="bar"/&gt;
  55. &lt;/augment&gt;</pre>
  56. <p>adds a <code>filename</code> selector to <samp>input-fs</samp>.</p>
  57. </body>
  58. </html>