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

1

6

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.

Wolsky answered 1/9, 2011 at 7:59 Comment(2)
Maybe this line is related?: phing.info/trac/browser/trunk/classes/phing/…Hallucinate
@Hallucinate Yes, it seems so. But I would prefer error messages to be more clear and understandable.Wolsky
U
4

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.

Unhurried answered 1/9, 2011 at 8:24 Comment(1)
Thanks. Your solution worked. But I should say, that Phing error messages aren't very clear and accurate ;)Wolsky

© 2022 - 2024 — McMap. All rights reserved.