mirror of
https://github.com/apache/ant.git
synced 2025-05-17 13:35:43 +00:00
(1) Make sure there is a Copyright notice on all visible files. (2) Make sure all years in which the file has been modified are listed. (3) Make sure the format is consistent, i.e. separate consecutive years with a dash, not a comma. When Stephane changed starteam.html it has been 2001 in France but 2002 in Australia - does that mean we add 2002 to the Copyright line or not? ;-) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270652 13f79535-47bb-0310-9956-ffa450edef68
115 lines
4.1 KiB
HTML
115 lines
4.1 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
<title>Apache Ant User Manual</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h2><a name="antcall">AntCall</a></h2>
|
|
<h3>Description</h3>
|
|
<p>Call another target within the same build-file optionally specifying some
|
|
properties (param's in this context)</p>
|
|
<p>By default, all of the properties of the current project will be
|
|
available in the new project. Alternatively, you can
|
|
set the <i>inheritAll</i> attribute to <code>false</code> and only
|
|
"user" properties (i.e., those passed on the command-line)
|
|
will be passed to the new project. In either case, the set of
|
|
properties passed to the new project will override the properties that
|
|
are set in the new project (See also the <a href="property.html">property task</a>).</p>
|
|
<p>You can also set properties in the new project from the old project by
|
|
using nested param tags. These properties are always passed regardless of the
|
|
setting of <i>inheritAll</i>. This allows you to parameterize your subprojects.</p>
|
|
|
|
<p>Nested <a href="#reference"><i><reference></i></a> elements can
|
|
be used to copy references from the calling project to the new
|
|
project, optionally under a different id. References taken from
|
|
nested elements will override existing references in the new
|
|
project.</p>
|
|
|
|
<p>
|
|
When a target is invoked by antcall, all of its dependent targets will
|
|
also be called within the context of any new parameters. For example. if
|
|
the target "doSomethingElse" depended on the target "init", then the
|
|
<i>antcall</i> of "doSomethingElse" will call "init" during the call.
|
|
Of course, any properties defined in the antcall task or inherited from the calling target
|
|
will be fixed and not overridable in the init task -or indeed in the "doSomethingElse" task.
|
|
</p>
|
|
<h3>Parameters</h3>
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td valign="top"><b>Attribute</b></td>
|
|
<td valign="top"><b>Description</b></td>
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">target</td>
|
|
<td valign="top">The target to execute.</td>
|
|
<td valign="top" align="center">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">inheritAll</td>
|
|
<td valign="top">If <code>true</code>, pass all properties to the new Ant
|
|
project. Defaults to <code>true</code>.
|
|
</td>
|
|
<td align="center" valign="top">No</td>
|
|
</tr>
|
|
</table>
|
|
<h3>Parameters specified as nested elements</h3>
|
|
<h4>param</h4>
|
|
<p>Specifies the properties to set before running the specified target. See <a
|
|
href="property.html">property</a> for usage guidelines.</p>
|
|
|
|
<h4><a name="reference">reference</a></h4>
|
|
<p>Used to chose references that shall be copied into the new project,
|
|
optionally changing their id.</p>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td valign="top"><b>Attribute</b></td>
|
|
<td valign="top"><b>Description</b></td>
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">refid</td>
|
|
<td valign="top">The id of the reference in the calling project.</td>
|
|
<td valign="top" align="center">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">toid</td>
|
|
<td valign="top">The id of the reference in the new project.</td>
|
|
<td valign="top" align="center">No, defaults to the value of refid.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3>Examples</h3>
|
|
<pre>
|
|
<target name="default">
|
|
<antcall target="doSomethingElse">
|
|
<param name="param1" value="value"/>
|
|
</antcall>
|
|
</target>
|
|
|
|
<target name="doSomethingElse">
|
|
<echo message="param1=${param1}"/>
|
|
</target>
|
|
</pre>
|
|
<p>Will run the target 'doSomethingElse' and echo 'param1=value'.</p>
|
|
|
|
<pre>
|
|
<antcall ... >
|
|
<reference refid="path1" torefid="path2" />
|
|
</antcall>
|
|
</pre>
|
|
|
|
<p>will copy the parent's definition of <code>path1</code> into the
|
|
new project using the id <code>path2</code>.</p>
|
|
|
|
<hr><p align="center">Copyright © 2001 Apache Software Foundation. All rights
|
|
Reserved.</p>
|
|
|
|
</body>
|
|
</html>
|
|
|