我有以下build.xml
文件:
<project name="myProject" default="testTarget" basedir=".">
<target name="testTarget">
<echo msg="starting task..." />
<exec command="echo hiiiiii" />
<echo msg="finished task..." />
</target>
</project>
当我从命令行phing testTarget
运行目标时,终端显示以下内容:
Buildfile: /usr/local/apache2/htdocs/myProject/build.xml
myProject > testTarget:
[echo] starting task...
[echo] finished task...
BUILD FINISHED
Total time: 0.1346 seconds
如您所见,<exec command="echo hiiiiii" />
未运行!!
我正在使用Phing 2.6.1和PHP 5.3.24与Xdebug v2.2.3
可能是什么原因?
答案 0 :(得分:0)
似乎添加passthru="true"
使其有效。所以新任务应该是:
<exec command="echo hiiiiii" passthru="true" />