Oops.  Ignore my previous mail.  I hit the Send key combo instead of the
Cancel key combo.  :P

... oh well, since you can't take back a sent message I might as well write
something ...

What I *was* thinking was some way to make use of the "unless" attribute in
the <target> tag.  But, seeing as how you want the "if" inside the <antcall>,
well, that wouldn't work.  I suppose maybe it is possible if you did some kind
of wrapper thing:

  <antcall target="Target1.A">
    <param name="foo" value="bar" />
  </antcall>
  <antcall target="Target1.B">
    <param name="foo" value="bar" />
  </antcall>

and then elsewhere you had:

  <target name="Target1.A" if="kung">
    <param name="foo" value="${foo}" />
    <param name="kung" value="fu" />
  </target>
  <target name="Target1.B" unless="kung">
    <param name="foo" value="${foo}" />
  </target>

So that one target would execute and the other one wouldn't.

Doh,
- e


On Thu, 7 Mar 2002, Tenchi-kun (Elliott) wrote:
  ;) Date: Thu, 7 Mar 2002 15:16:47 -0800 (PST)
  ;) From: "Tenchi-kun (Elliott)" <[EMAIL PROTECTED]>
  ;) Reply-To: Ant Users List <[EMAIL PROTECTED]>
  ;) To: Ant Users List <[EMAIL PROTECTED]>
  ;) Subject: Re: How to conditionally add params to an <antcall>
  ;)
  ;) In a convoluted way, couldn't you do something like:
  ;)
  ;)   <antcall target="target1">
  ;)     <param name="foo" value = "bar" />
  ;)     <if property is defined>
  ;)       <param name="kung" value = "fu" />
  ;)     </if>
  ;)   </antcall>
  ;)
  ;) On Thu, 7 Mar 2002, Steve Cohen wrote:
  ;)   ;) there must be a way to do this, but I don't know what it is.
  ;)   ;)
  ;)   ;) I want to have in my script something like this (pseudo code):
  ;)   ;) <antcall target="target1">
  ;)   ;)    <param name="foo" value = "bar" />
  ;)   ;)    <if property is defined>
  ;)   ;)          <param name="kung" value = "fu" />
  ;)   ;)    </if>
  ;)   ;) </antcall>
  ;)   ;)
  ;)   ;) -----------------------------------------------------------------
  ;)   ;) Steve Cohen
  ;)   ;) Sr. Software Engineer
  ;)   ;) Ignite Sports, Inc.
  ;)   ;) [EMAIL PROTECTED]
  ;)   ;)
  ;)   ;)
  ;)   ;)
  ;)
  ;)
  ;)
  ;) ````[ Elliott Lee -- RTIM Group ]``````"'"'`'"`'"'`'""'`'```"''`''`'`""``````
  ;)
  ;)        [EMAIL PROTECTED]/email   408.527.2264/desk   408.815.3822/pager
  ;)
  ;) `````````"'''`'```"`'"'`''"`'```"`"""```"`''''`"'""```'''`'`'"''`''"'````````
  ;)
  ;)
  ;)
  ;) --
  ;) To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
  ;) For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
  ;)
  ;)



````[ Elliott Lee -- RTIM Group ]``````"'"'`'"`'"'`'""'`'```"''`''`'`""``````

       [EMAIL PROTECTED]/email   408.527.2264/desk   408.815.3822/pager

`````````"'''`'```"`'"'`''"`'```"`"""```"`''''`"'""```'''`'`'"''`''"'````````



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

Reply via email to