Mikael, if you use 1.6.* ant branch - you can also look ant-contrib library : http://ant-contrib.sourceforge.net/ - (URL may be wrong - sorry if it's true :) )
If that package you get variable or var task - that task can overwrite and unset ant properties. Also you get some useful stuff like if/switch tasks, for/foreach loop tasks, Propertycopy/PropertySelector/PropertyRegex tasks(it's cool :) ), etc... Packages : ftp://clamavdb.heanet.ie/mirrors/download.sourceforge.net/pub/sourceforge/a/an/ant-contrib/ant-contrib-1.0b2-bin.tar.bz2 ftp://clamavdb.heanet.ie/mirrors/download.sourceforge.net/pub/sourceforge/a/an/ant-contrib/ant-contrib-1.0b2-src.tar.bz2 ----====[]====---- С уважением, Пустовалов Михаил [mailto:[EMAIL PROTECTED] RDC Protei -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 23, 2006 2:53 PM To: [email protected] Subject: AW: How to set properties when property is set <condition property="propfile" value="present.properties" else="absent.properties"> <available file="${gen.dir}"/> </condition> <property file="${propfile}"/> Jan >-----Ursprüngliche Nachricht----- >Von: Mikael Petterson (KI/EAB) [mailto:[EMAIL PROTECTED] >Gesendet: Dienstag, 23. Mai 2006 12:23 >An: Ant Users List >Betreff: How to set properties when property is set > >Hi, > >I have a property that checks if a certain directory exists. >If that property, gen.dir.present, is true then I need to set >a bunch of properties. If false I set them to other values. Is >there a Smooth way to do this. > > <property name="gen.dir" >value="/vobs/rbs/sw/rbssw_boam/boam_subsys/boam_swb/boammao_swu >/src/ifac >e/gen"/> > <available file="${gen.dir}" property="gen.dir.present"/> ><echo message="New refactored structure for iface present: >${gen.dir.present}"/> > >Cheers, > >//mikael > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
