ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Newbie question about if/then/else
Date Tue, 23 Apr 2002 19:53:46 GMT
--- Kailash.Subramanian@alltel.com wrote:
> Thanks a lot Diane. The logic you provided worked. I am using 1.4.1 and
> soon will migrate to 1.5 Alpha.
> To give an idea of what  I am doing is
> [snip]

Eeeesh. I'd definitely recommend going with the <foreach> and <if> tasks
as soon as you upgrade to 1.5 so you can shrink all that down to:
  <target name="copyfiles">
    <foreach list="${COMP_TM.JAR},${COMP_PAY.JAR},${COMP_USER.JAR},..."
      target="docopy" param="file"/>
  </target>

  <target name="docopy">
    <available property="isAvailable" file="${file}"/>
    <if>
      <istrue value="${isAvailable}"/>
    <then>
      <copy file="${file}" todir="${CODE_BASE}../"/>
    </then>
    </if>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

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


Mime
View raw message