ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Phonsa <VPho...@suz.com>
Subject RE: <AntCall> - using "if" for conditional invocation?
Date Tue, 05 Aug 2003 21:47:50 GMT
Well I don't know if antcall will support "if" attribute in future or not
but there definitely is a workaround.

Instead of placing "if" in the <antcall> try putting if in the "bar"
<target>. Something like this:

<target name="foo">
    <antcall target="bar">
    </antcall>
  </target>

<target name="bar" if="do.bar" >
   <echo message="Ant is cool. "/>
</target>


This target will execute if the "do.bar" property has been set. Otherwise
Ant would give u a message that the target has been skipped because of the
property not being set.

Vikas


-----Original Message-----
From: Sullivan, Sean C - MWT [mailto:Sullivan.Sean@menlolog.com] 
Sent: Tuesday, August 05, 2003 2:41 PM
To: Ant Users List
Subject: <AntCall> - using "if" for conditional invocation?


I am using Ant 1.5.3

I'd like to be able to do this:

#######################################


#######################################

This code won't execute in Ant 1.5.3

Ant prints this message:

BUILD FAILED
file:C:/build/apps/build/build.xml:271: 
  The <antcall> task doesn't support the "if" attribute.


Is there a workaround?

Will <antcall> ever support the "if" attribute?

Thanks.

-Sean


---------------------------------------------------------------------
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