ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitris Mouchritsas <dimitris.mouchrit...@eurodyn.com>
Subject Re: AW: check property file exists and which properties are missing in Ant 1.8?
Date Thu, 11 Feb 2010 11:33:50 GMT
Jan.Materne@rzf.fin-nrw.de wrote:
>> 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"/>
>     <sequential>
>         <fail message="@{file} does not exist.">
>             <condition>
>                 <not><available file="@{file}"/></not>
>             </condition>
>         </fail>
>     </sequential>
> </macrodef>
> 
> <macrodef name="requireProperty">
>     <attribute name="property"/>
>     <sequential>
>         <fail message="@{property} does not exist.">
>             <condition>
>                 <not><isset property="@{property}"/></not>
>             </condition>
>         </fail>
>     </sequential>
> </macrodef>
> 
> 
> 
> 
> Jan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
Seems to work pretty well :) Thanks.

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


Mime
View raw message