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.

antcall.html 2.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="antcall">AntCall</a></h2>
  8. <h3>Description</h3>
  9. <p>Call another target within the same build-file optionally specifying some
  10. properties (param's in this context)</p>
  11. <p>By default, all of the properties of the current project will be
  12. available in the new project. Alternatively, you can
  13. set the <i>inheritAll</i> attribute to <code>false</code> and only
  14. &quot;user&quot; properties (i.e., those passed on the command-line)
  15. will be passed to the new project. In either case, the set of
  16. properties passed to the new project will override the properties that
  17. are set in the new project (See also the <a href="property.html">property task</a>).</p>
  18. <p>You can also set properties in the new project from the old project by
  19. using nested param tags. These properties are always passed regardless of the
  20. setting of <i>inheritAll</i>. This allows you to parameterize your subprojects.</p>
  21. <h3>Parameters</h3>
  22. <table border="1" cellpadding="2" cellspacing="0">
  23. <tr>
  24. <td valign="top"><b>Attribute</b></td>
  25. <td valign="top"><b>Description</b></td>
  26. <td align="center" valign="top"><b>Required</b></td>
  27. </tr>
  28. <tr>
  29. <td valign="top">target</td>
  30. <td valign="top">The target to execute.</td>
  31. <td valign="top" align="center">Yes</td>
  32. </tr>
  33. <tr>
  34. <td valign="top">inheritAll</td>
  35. <td valign="top">If <code>true</code>, pass all properties to the new Ant
  36. project. Defaults to <code>true</code>.
  37. </td>
  38. <td align="center" valign="top">No</td>
  39. </tr>
  40. </table>
  41. <h3>Parameters specified as nested elements</h3>
  42. <h4>param</h4>
  43. <p>Specifies the properties to set before running the specified target. See <a
  44. href="property.html">property</a> for usage guidelines.</p>
  45. <h3>Examples</h3>
  46. <pre>
  47. &lt;target name=&quot;default&quot;&gt;
  48. &lt;antcall target=&quot;doSomethingElse&quot;&gt;
  49. &lt;param name=&quot;param1&quot; value=&quot;value&quot;/&gt;
  50. &lt;/antcall&gt;
  51. &lt;/target&gt;
  52. &lt;target name=&quot;doSomethingElse&quot;&gt;
  53. &lt;echo message=&quot;param1=${param1}&quot;/&gt;
  54. &lt;/target&gt;
  55. </pre>
  56. <p>Will run the target 'doSomethingElse' and echo 'param1=value'.</p>
  57. <hr><p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  58. Reserved.</p>
  59. </body>
  60. </html>