You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Th...@materna.de on 2007/02/01 17:38:07 UTC

AW: How to let the copy-task fail if a fileset is not completely available

Hi!

I figured out the following construction.

    <macrodef name="copy2dir">
        <attribute name="todir"/>
        <attribute name="filelistid"/>
        <sequential>
            <echo message="### Copying filelist to directory [@{todir}]..."/>
            <for param="myfile">
                <filelist refid="@{filelistid}"/>
                <sequential>
                    <copy verbose="false" overwrite="true" file="@{myfile}" todir="@{todir}"/>
                </sequential>
            </for>
            <echo message="### Copying finished."/>
        </sequential>
    </macrodef>

    <target name="make-pkg">
        <filelist id="filelist.tmp">
            <file name="/src/alpha"/>
            <file name="/src/beta"/>
            <file name="/src/gamma"/>
        </filelist>
        <copy2dir filelistid="filelist.tmp" todir="/tmp"/>
    </target>

It works fine.
But nevertheless, is there maybe a simpler way to achieve this?

Regards,
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org