2011-09-01 70 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的錯誤信息並不十分清晰和準確;) –