"phing.types.Path不支持嵌套文本数据" - 这是什么意思?

Vla*_*sny 6 php ant phing build-process

我有以下Phing配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<project name="ru.fractalizer.phpsweetpdo" default="make-phar-packages" basedir="..">

    <target name="run-tests-library" description="Running all the tests">
        <phpunit>
            <formatter type="plain" usefile="false"/>
            <batchtest>
                <classpath>.</classpath>
                <fileset dir="tests/Library">
                    <include name="**/*Test*.php"/>
                </fileset>
            </batchtest>
        </phpunit>
    </target>
Run Code Online (Sandbox Code Playgroud)

但是在这个目标上执行Phing构建会给我一个错误:

执行目标"run-tests-library"失败的原因如下:Z:\ Work\PHP\phpSweetPDO\phing\build.xml:5:17:phing.types.Path不支持嵌套文本数据.

BUILD FAILED Z:\ Work\PHP\phpSweetPDO\phing\build.xml:5:17:phing.types.Path不支持嵌套文本数据.总时间:9.0173秒

我不明白这个消息.究竟什么不支持?

5:17 "<phpunit>"是写入标记的行.

mar*_*ton 4

问题是你的类路径定义:

<classpath>.</classpath>
Run Code Online (Sandbox Code Playgroud)

嵌套文本是单个.. 您可以通过多种方式定义路径:

  • 嵌套pathelement元素。
  • 嵌套filesetdirset、 和其他资源集合元素。
  • 内联使用该path属性。

对于你的简单情况,也许

<classpath path="." />
Run Code Online (Sandbox Code Playgroud)

将是要走的路。

请参阅Ant 文档中的类路径结构部分。