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.

presetdef.html 2.1 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us"></meta>
  4. <title>PreSetDef Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="presetdef">PreSetDef</a></h2>
  8. <h3>Description</h3>
  9. <p>
  10. The preset definition generates a new definition
  11. based on a current definition with some attributes
  12. or elements preset.
  13. </p>
  14. <p>
  15. Introduced in ant1.6 <font color="red">Experimental</font>.
  16. </p>
  17. <h3>Parameters</h3>
  18. <table border="1" cellpadding="2" cellspacing="0">
  19. <tr>
  20. <td valign="top"><b>Attribute</b></td>
  21. <td valign="top"><b>Description</b></td>
  22. <td align="center" valign="top"><b>Required</b></td>
  23. </tr>
  24. <tr>
  25. <td valign="top">name</td>
  26. <td valign="top">the name of the new definition</td>
  27. <td valign="top" align="center">Yes</td>
  28. </tr>
  29. <tr>
  30. <td valign="top">uri</td>
  31. <td valign="top">
  32. The uri that this definition should live in.
  33. </td>
  34. <td valign="top" align="center">No</td>
  35. </tr>
  36. </table>
  37. <h3>Parameters specified as nested elements</h3>
  38. <h4>another type with attributes or elements set</h4>
  39. <p>The &lt;presetdef&gt; task takes one nested element as a parameter.
  40. This nested element can be any other type or task. The attributes
  41. and elements that need to be preset are placed here.
  42. </p>
  43. <h3>Examples</h3>
  44. <p>
  45. The following fragment defines a javac task with the debug and deprecation
  46. attributes set. It also has a src element to source files from a generated
  47. directory.
  48. </p>
  49. <blockquote>
  50. <pre>
  51. &lt;presetdef name="my.javac"&gt;
  52. &lt;javac debug="${debug}" deprecation="${deprecation}"&gt;
  53. &lt;src path="${gen.dir}"/&gt;
  54. &lt;/javac&gt;
  55. &lt;/presetdef&gt;
  56. </pre>
  57. </blockquote>
  58. <p>
  59. This can be used as a normal javac task - example:
  60. </p>
  61. <blockquote>
  62. <pre>
  63. &lt;my.javac src="${src.dir}" destdir="${classes.dir}"/&gt;
  64. </pre>
  65. </blockquote>
  66. <hr>
  67. <p align="center">Copyright &copy; 2003 Apache Software
  68. Foundation. All rights Reserved.</p>
  69. </body>
  70. </html>