Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"phing.types.Path doesn't support nested text data" - what does it mean?

I have the following Phing configuration file:

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

But executing Phing build on this target gives me error:

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

I don't understand the message. What exactly is not supported?

5:17 is the line where "<phpunit>" tag is written.

like image 448
Vladislav Rastrusny Avatar asked Sep 01 '11 07:09

Vladislav Rastrusny


1 Answers

The problem is your classpath definition:

<classpath>.</classpath>

The nested text is the single .. You can define a path in various ways:

  • Nested pathelement elements.
  • Nested fileset, dirset, and other resource collection elements.
  • In-line using the path attribute.

For your simple case, perhaps

<classpath path="." />

would be the way to go.

See the Path-like Structures section in the the Ant docs.

like image 158
martin clayton Avatar answered Oct 11 '22 02:10

martin clayton