ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parnell, Giles (AU - Sydney)" <>
Subject RE: Conditional Statement
Date Thu, 31 Jul 2003 06:48:26 GMT
I asked the same question a couple of hours ago.... it appears to be abit of
a topic at the moment.

Heres the answer i got. Seems to work fine.

> Ant-contrib and Antelope both have <if> tasks that do what you want.
> There have been several message regarding these external projects today
> and yesterday.

-----Original Message-----
From: Stefan Bodewig []
Sent: Thursday, 31 July 2003 4:39 PM
Subject: Re: Conditional Statement

On Wed, 30 Jul 2003, Matt <> wrote:

> How do we add "if-else" statements in Ant. I need to compare two
> variables and execute a task if they are not equal and abort with an
> error message if they are equal.

<condition property="they-are-equal">
  <equals arg1="${property1}" arg2="${property2}"/>
<fail if="they-are-equal">property1 and property2 must not be equal.</fail>


To unsubscribe, e-mail:
For additional commands, e-mail:

***********Confidentiality/Limited Liability Statement***************

This message contains privileged and confidential information intended
only for the use of the addressee named above.  If you are not the 
intended recipient of this message, you must not disseminate, copy or 
take any action in reliance on it.  If you have received this message 
in error, please notify Deloitte Touche Tohmatsu immediately.  Any 
views expressed in this message are those of the individual sender, 
except where the sender specifically states them to be the views of 

The liability of Deloitte Touche Tohmatsu, is limited by, and to the 
extent of, the Accountants' Scheme under the Professional Standards 
Act 1994 (NSW).

The sender cannot guarantee that this email or any attachment to it 
is free of computer viruses or other conditions which may damage or
interfere with data, hardware or software with which it might be used.
It is sent on the strict condition that the user carries out and relies
on its own procedures for ensuring that its use will not interfere with
the recipients systems and the recipient assumes all risk of use and
absolves the sender of all responsibility for any consequence of its use.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message