ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: check property file exists and which properties are missing in Ant 1.8?
Date Thu, 11 Feb 2010 11:20:15 GMT
>I'm giving Ant 1.8.0 a try on a new project. I'd like to ask if there
>have been any changes for loading property files (break the build if 
>they're not found) 

should not.
But using <property file/> the specified property file doesnt have to
exist - since a long time...

> and if ant can report on the properties missing.
>Are there any related ant-contrib tasks?

<fail> with <isset> condition.

<macrodef name="requireFile">
    <attribute name="file"/>
        <fail message="@{file} does not exist.">
                <not><available file="@{file}"/></not>

<macrodef name="requireProperty">
    <attribute name="property"/>
        <fail message="@{property} does not exist.">
                <not><isset property="@{property}"/></not>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message