ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Setting property depend of other properties
Date Tue, 13 Nov 2001 15:22:46 GMT
--- Holger Danske <> wrote:
> I want to set a new property depend on others
> properties, something like:
> <condition name="newproperty">
>   <and>
>     <available _property_A >
>     <available _property_B >
>     <available _property_c >
>   </and>
> </condition>
> Does anybody have an idea.

If you can use a nightly build, there's a new condition, <isset>, you can
use to check if a property is set. If you need to use a release (ie., 1.4
or 1.4.1), you can use the approach I offered awhile back, setting a
"check" property for each property you're checking for being set -- for

  <target name="setNewproperty">
    <property name="chkpropA" value="$${propA}"/>
    <property name="chkpropB" value="$${propB}"/>
    <property name="chkpropC" value="$${propC}"/>
    <condition property="newproperty">
          <equals arg1="${propA}" arg2="${chkpropA}"/>
          <equals arg1="${propB}" arg2="${chkpropB}"/>
          <equals arg1="${propC}" arg2="${chkpropC}"/>

"newproperty" will get set only if "propA", "propB", and "propC" are all



Do You Yahoo!?
Find the one for you at Yahoo! Personals

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

View raw message