ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Pustovalov " <pustova...@protei.ru>
Subject RE: How to set properties when property is set
Date Tue, 23 May 2006 11:13:23 GMT
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:pustovalov@protei.ru]
    RDC Protei


-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Tuesday, May 23, 2006 2:53 PM
To: user@ant.apache.org
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:mikael.petterson@ericsson.com] 
>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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message