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.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. <h3>Description</h3>
  24. <p>Modify an existing reference by adding nested elements or (re-)assigning properties
  25. mapped as XML attributes. This is an unusual task that makes use of Ant's internal
  26. processing mechanisms to reload a previously declared reference by means of the 'id'
  27. attribute, then treats the declared <code>augment</code> element as though it were the
  28. original element.
  29. <b>Since Ant 1.8.1</b></p>
  30. <h3>Parameters</h3>
  31. <table border="1" cellpadding="2" cellspacing="0">
  32. <tr>
  33. <td valign="top"><b>Attribute</b></td>
  34. <td valign="top"><b>Description</b></td>
  35. <td align="center" valign="top"><b>Required</b></td>
  36. </tr>
  37. <tr>
  38. <td valign="top">id</td>
  39. <td valign="top">The id of the reference to augment. If no such reference has
  40. been declared a <code>BuildException</code> is generated.</td>
  41. <td valign="top" align="center">Yes</td>
  42. </tr>
  43. </table>
  44. <p>
  45. Additional permissible attributes are dependent on the reference to be modified.
  46. </p>
  47. <h3>Parameters specified as nested elements</h3>
  48. <p>
  49. Permissible nested elements are dependent on the reference to be modified.
  50. </p>
  51. <h3>Examples</h3>
  52. Given
  53. <pre>
  54. &lt;fileset id="input-fs" dir="${basedir}" /&gt;
  55. </pre>
  56. <pre>
  57. &lt;augment id="input-fs" excludes="foo" /&gt;
  58. </pre>
  59. <p>Modifies the <code>excludes</code> attribute of <code>input-fs</code>.</p>
  60. <pre>
  61. &lt;augment id="input-fs"&gt;
  62. &lt;filename name="bar" /&gt;
  63. &lt;/augment&gt;
  64. </pre>
  65. <p>Adds a <code>filename</code> selector to <code>input-fs</code>.</p>
  66. </body>
  67. </html>