ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: target ifTrue
Date Wed, 21 Aug 2002 04:07:24 GMT
--- "Wannheden, Knut" <> wrote:
> you could just have the property defined in one properties file and
> undefined in the other.  i.e.
> in
> test=true
> in
> #test=true
> and then
> <target name="test" if="test">
>  ...
> </target>
> Now you just have to load the properties file prior to calling the test
> target.

I'm afraid that wouldn't work, since (I assume) the idea is to read in
both and, with values
overriding (being read in first) those in -- so just
commenting out the targets in won't stop them from getting
defined by

I think you (Tibor) need to re-think your approach. Instead of setting
target names to true and false and trying to "if" on the value, you should
just assume that all targets are run by default (ie., don't set any value
for them in, since it's not necessary, if they're all
"on" by default), then set "exclude.<target_name>" properties in that you then 'unless' on in your <target>'s. For example:


  <target name="test" unless="exclude.test">



Do You Yahoo!?
HotJobs - Search Thousands of New Jobs

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

View raw message