ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Strausz <Tibor.Stra...@tridion.com>
Subject RE: target ifTrue
Date Wed, 21 Aug 2002 08:12:59 GMT

yes that makes sense but it could be that by default one task is turned off
lets say that a task is not needed for now
or there is an optional task which does some extra stuff

tibi

> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Wednesday, August 21, 2002 6:07 AM
> To: Ant Users List
> Subject: RE: target ifTrue
> 
> 
> --- "Wannheden, Knut" <knut.wannheden@paranor.ch> wrote:
> > you could just have the property defined in one properties file and
> > undefined in the other.  i.e.
> > 
> > in default.properties
> > test=true
> > 
> > in my.properties
> > #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 my.properties and defaults.properties, with my.properties values
> overriding (being read in first) those in defaults.properties 
> -- so just
> commenting out the targets in my.properties won't stop them 
> from getting
> defined by defaults.properties.
> 
> 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 defaults.properties, since it's not necessary, if 
> they're all
> "on" by default), then set "exclude.<target_name>" properties in
> my.properties that you then 'unless' on in your <target>'s. 
> For example:
> 
> #my.properties
> exclude.test=true
> 
> ----
> 
>   <target name="test" unless="exclude.test">
>     ...
>   </target>
> 
> Diane
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 

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


Mime
View raw message