Hi Peter,

thx, your suggestion is more elegant and works perfect :)

Gilbert

-----Original Message-----
From: Peter Reilly [mailto:[EMAIL PROTECTED]
Sent: Monday, December 13, 2004 6:30 PM
To: Ant Users List
Subject: Re: ant-contrib <if>


use an if in an if?
  <if>
    <contains string="${infomail.module}" substring="ModuleA" 
casesensitive="false"/>
    <then>
      <if>
        <contains string="${infomail.lum}" substring="TS"/>
        <then>
          <echo file = "T:\test/infomail_tolist.txt" append="true">
Avg-MODULA-Tester
Avg-MODULA-Developer 
          </echo>
       </then>
        <else>
          <echo file = "T:\test/infomail_tolist.txt" append="true">
Avg-MODULA-Developer
          </echo>
        </else>
      </if>
    </then>
  </if>

Peter
Rebhan, Gilbert wrote:

>Hi, it's me again ;)
>
>Ooops, as the developers should always be informed,
>even if property ${infomail.lum} only contains TS, 
>i had to change it like that - see *** :
>
>So now my solution with ant-contrib looks like :
>
><if>
>      <and>
>        <contains string="${infomail.module}" substring="ModuleA" 
> casesensitive="false"/>
>        <contains string="${infomail.lum}" substring="TS"/>
>      </and>
>      <then>
>        <echo file = "T:\test/infomail_tolist.txt" append="true">
>Avg-MODULA-Tester
>Avg-MODULA-Developer  <----- ***
>        </echo>
>       </then>
>       <elseif>
>       <and>
>       <contains string="${infomail.module}" substring="ModulA" 
> casesensitive="false"/>
>       <not>
>        <contains string="${infomail.lum}" substring="TS"/>
>        </not>
>       </and>
>       <then>
>  <echo file = "T:\test/infomail_tolist.txt" append="true">
>Avg-MODULA-Developer
>      </echo>
>         </then>
>       </elseif>     
></if>
>
>Anyone with a more elegant solution ?!
>
>Gilbert



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

Reply via email to