ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Martel" <pmar...@taleo.com>
Subject RE: how to run a target with condition task?
Date Mon, 03 May 2004 16:33:11 GMT


Here is a good explanation about a conditional execution.  You can retreive it on this site:
http://blog.ideoplex.com/software/java/antTutorial6.html

Target "hello" will be executed if property "hello.set" is created.
Target "goodbye" will be executed if property "hello.set" is NOT created.

<project default="all">
  <target name="hello" if="hello.set">
    <echo message="Hello, World"/>
  </target>
  <target name="goodbye" unless="hello.set">
    <echo message="Goodbye, Cruel World"/>
  </target>
  <target name="all" depends="hello,goodbye" />
</project>

Bye

-----Original Message-----
From: Neta Bar Tal [mailto:NETAB@Amdocs.com]
Sent: 3 mai 2004 12:25
To: Ant Users List
Subject: how to run a target with condition task?



Hi All,
I'm trying to create the following example:


run <javac>
if <javac> failed run <kuku>


is there a way to do it with ant?



thanks in advance.


netaB






The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of

this communication is strictly prohibited and may be unlawful.

If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.

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


Mime
View raw message