ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Thomas.Poer...@materna.de>
Subject AW: How to let the copy-task fail if a fileset is not completely available
Date Thu, 01 Feb 2007 16:38:07 GMT
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


Mime
View raw message