Hi,

i have to check a property, if it contains a specific value

here is my snippet :
...
<if>
     <and>
        <!-- checkin whether TS appears in property
        <contains string="${infomail.lum}" substring="TS" />
        <contains string="${infomail.module}" substring="ModuleA" 
casesensitive="false"/>
     </and>
        
     <then>
<echo file = "T:\test/infomail_tolist.txt" append="true">

Gvg-MODULA-Tester               <-- only to append if string TS is contained
Gvg-MODULA-Developer
</echo>
      </then>      
</if>
<if>
     <and>
        <!-- all the other possible values for ${infomail.lum} -->
        <contains string="${infomail.lum}" substring="T7,TP,DE,PR" />
        <contains string="${infomail.module}" substring="ModuleA" 
casesensitive="false"/>
     </and>
        
     <then>
<echo file = "T:\test/infomail_tolist.txt" append="true">
Gvg-MODULA-Developer
</echo>
      </then>      
</if> 
...

That works, but i'm looking for a more elegant way.
Didn't find an example in the ant-contrib docs.

Any ideas ?

Gilbert
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to