ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: ant-contrib <if>
Date Mon, 13 Dec 2004 17:29:43 GMT
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: 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
>
>
>
>  
>


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


Mime
View raw message