Call another target within the same build-file optionally specifying some properties (param's in this context)
By default, all of the properties of the current project will be
available in the new project. Alternatively, you can
set the inheritAll attribute to false
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 property task).
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 inheritAll. This allows you to parameterize your subprojects.
Attribute | Description | Required |
target | The target to execute. | Yes |
inheritAll | If true , pass all properties to the new Ant
project. Defaults to true .
|
No |
Specifies the properties to set before running the specified target. See property for usage guidelines.
<target name="default"> <antcall target="doSomethingElse"> <param name="param1" value="value"/> </antcall> </target> <target name="doSomethingElse"> <echo message="param1=${param1}"/> </target>
Will run the target 'doSomethingElse' and echo 'param1=value'.
Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.