企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# B.30 PhingTask 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.34](apbs34.html "B.34 PropertyTask")). Table B.29:聽Attributes NameTypeDescriptionDefaultRequired`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/aNo`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/aYes`target``String`The target of the new Phing project to execute. Default is the new project's default target.n/aNo`haltonfailure``Boolean`If true, fail the build process when the called build fails`false`No B.30.1 Examples ``` <!-- 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> ``` B.30.2 Supported Nested Tags - `fileset` B.30.3 Base directory of the new project The base directory of the new project is set dependent 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.30:聽How attributes are used `dir``inheritAll`new project's basedirvalue provided`true`value of `dir` attributevalue 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