ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Properties set within conditions
Date Tue, 12 Oct 2004 15:59:40 GMT
> From: Rhino [mailto:rhino1@sympatico.ca]
> I don't think I've ever seen a target that sets properties within a
> conditional before. Could you possibly provide an example?
> 
> By the way, I've got my script working very nicely now with
'antcallback'.
> Thanks *very* much for this suggestion! However, I'd still like to see
> other
> ways to do the same thing, especially ways that don't involve
installing
> extra tasks.

<antcallback> is clearly the wrong way about it...

The pure Ant way is to use either targets with if/unless that
you *depend* on (as opposed to <antcall>), or use several properties
files of which you load just one based on another property value. The
archives as many many such examples.

The Ant-contrib way would be to simply use <if> or <switch> to
set the property conditionally.

<antcallback> is an abomination and should never be used ;-) --DD

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


Mime
View raw message