This task calls another build file. You may specify the target that is to be called
within the build file. Additionally, the <phing>
Tag may contain
<property>
Tags (see Section B.32, “PropertyTask ”).
Table B.27: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
inheritAll | Boolean | If true, pass all properties to the new phing project. | true | No |
inheritRefs | Boolean | If true, pass all references to the new phing project. | false | No |
dir | String | The directory to use as a base directory for the new phing project.
Default is the current project's basedir, unless inheritall has been set
to false , in which case it doesn't have a default
value. This will override the basedir setting of the called
project. | n/a | No |
phingFile | String | The build file to use. Defaults to "build.xml". This file is expected to be a filename relative to the dir attribute given. | n/a | Yes |
target | String | The target of the new Phing project to execute. Default is the new project's default target. | n/a | No |
haltonfailure | Boolean | If true, fail the build process when the called build fails | false | No |
<!-- Call target "xslttest" from buildfile "alternativebuildfile.xml" --> <phing phingfile="alternativebuild.xml" inheritRefs="true" target="xslttest" /> <!-- Do a more complex call --> <phing phingfile="somebuild.xml" target="sometarget"> <property name="foo" value="bar" /> <property name="anotherone" value="32" /> </phing>
The base directory of the new project is set dependant on the dir
and
the inheritAll
attribute. This is important to keep in mind or
else you might run into bugs in your build.xml
's. The following
table shows when which value is used:
Table B.28: How attributes are used
dir | inheritAll | new project's basedir |
---|---|---|
value provided | true | value of dir attribute |
value provided | false | value of dir attribute |
omitted | true | basedir of calling task (the build file containing the
<phing> call. |
omitted | false | basedir attribute of the <project> element
of the new project |