Echoing out ant fileset to screen for Debugging

mainstringargs picture mainstringargs · Oct 14, 2010 · Viewed 22.7k times · Source

I have this:

    <ivy:buildlist reference="build-path">
        <fileset dir="${root.dir}">
            <include name="*/build.xml" />
            <include name="controllers/*/build.xml" />
        </fileset>
    </ivy:buildlist>


    <subant buildpathref="build-path">
        <target name="jar.all" />
        <target name="publish-local" />
    </subant>

I want to echo out everything that is in the "build-path" reference (for debugging some things).

I have tried:

<echo>${build-path}</echo>

but it just echos that exact text "${build-path}"

Answer

martin clayton picture martin clayton · Oct 14, 2010

You can use the documented (honest, it's in there somewhere...) toString helper:

<echo message="My build-path is ${toString:build-path}" />