ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Conditional Statement
Date Thu, 31 Jul 2003 06:39:27 GMT
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:

View raw message