ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kravchenko" <vladkravche...@googlemail.com>
Subject Re: How to make expandproperties fail if one of the properties cannot be found
Date Thu, 07 Dec 2006 13:28:18 GMT
Thank you.

It is pretty good solution.

Vlad


On 12/7/06, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de > wrote:
>
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message