2011-09-01 74 views
4

我有以下Phing配置文件:“phing.types.Path不支持嵌套文本数据” - 这是什么意思?

<?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> 

但执行Phing建立在这个目标给了我错误:

Execution of target "run-tests-library" failed for the following reason: Z:\Work\PHP\phpSweetPDO\phing\build.xml:5:17: phing.types.Path doesn't support nested text data.

BUILD FAILED Z:\Work\PHP\phpSweetPDO\phing\build.xml:5:17: phing.types.Path doesn't support nested text data. Total time: 9.0173 seconds

我不明白的消息。什么不支持?

5:17是写入"<phpunit>"标签的行。

+0

也许这条线是相关的吗?http://www.phing.info/trac/browser/trunk/classes/phing/IntrospectionHelper.php?rev=311#L365 – hakre

+0

@hakre是的,似乎是这样。但我更希望错误信息更清晰易懂。 –

回答

4

的问题是你的类路径定义:

<classpath>.</classpath> 

嵌套的文本是单.。你可以用各种方式定义路径:

  • 嵌套pathelement元素。
  • 嵌套fileset,dirset和其他资源收集元素。
  • 在线使用path属性。

为您简单的情况下,也许

<classpath path="." /> 

将要走的路。

请参阅Ant文档中的Path-like Structures部分。

+0

谢谢。您的解决方案奏效但是我应该说,Phing的错误信息并不十分清晰和准确;) –