The PhingCallTask calls a target within the same Phing project.
A <phingcall>
tag may contain <property>
tags that define new properties. These properties are only set if properties of the same
name have not been set outside the "phingcall"
tag.
Table B.26: Attributes
Name | Type/Values | Description | Default | Required |
---|---|---|---|---|
target | String | The name of the target in the same project that is to be called. | n/a | Yes |
Local scope.
Every <phingcall>
tag creates a new local scope. Thus, any
properties or other variables set inside that scope will cease to exist (or revert
to their previous value) once the <phingcall>
tag
completes.
<target name="foo"> <phingcall target="bar"> <property name="property1" value="aaaaa" /> <property name="foo" value="baz" /> </phingcall> </target>
In the example above, the properties property1
and
foo
are defined and only accessible inside the called
target.
<target name="bar" depends="init"> <echo message="prop is ${property1} ${foo}" /> </target>