ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: How to make expandproperties fail if one of the properties cannot be found
Date Thu, 07 Dec 2006 10:10:17 GMT
I dont know a "clean" way, but maybe this is enough for you

<project>

    <copy file="x.template" tofile="x.properties" overwrite="true">
        <filterchain>
            <expandproperties/>
        </filterchain>
    </copy>

    <!-- Check for unset properties in the file -->
    <loadfile property="prop" srcfile="x.properties"/>
    <fail>
        There are unset properties
        <condition><contains string="${prop}" substring="$${"/></condition>
    </fail>

</project>



Jan 


>-----Urspr√ľngliche Nachricht-----
>Von: Vladimir Kravchenko [mailto:vladkravchenko@googlemail.com] 
>Gesendet: Donnerstag, 7. Dezember 2006 09:48
>An: user@ant.apache.org
>Betreff: How to make expandproperties fail if one of the 
>properties cannot be found
>
>Hi,
>
>I am using expandproperties within the copy task.
>I would like my build fails when at least one of the 
>properties cannot be expanded.
>Otherwise it can lead to runtime errors ...
>
>Is there any way to make expandproperties stricter?
>
>
>Best regards,
>Vlad
>

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


Mime
View raw message