ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Martel" <>
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:

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 name="goodbye" unless="hello.set">
    <echo message="Goodbye, Cruel World"/>
  <target name="all" depends="hello,goodbye" />


-----Original Message-----
From: Neta Bar Tal []
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.


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:
For additional commands, e-mail:

View raw message