ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Blanc <Sebastien.Bl...@alcatel.com>
Subject Re: Conditional Statement
Date Wed, 30 Jul 2003 20:47:00 GMT
for <condition>, u have to set a property to true in a do-check target using
<equal>.
then use unless
<target name="Test" description="CVS Import" depends="init"
unless="do-check">
seb.

Matt wrote:

> It seems <condition> is supposed to be used for properties only. And
> what's antelope. I tried to do this simple task and it doesn't work.
>
> <target name="init">
>                         <echo message="Here is the basedir=${basedir}"/>
>                         <property name="var1" value="Vik"/>
>                         <property name="var2" value="Vik"/>
>                         <property name="var3" value="Viky"/>
>
>         </target>
>
> <target name="Test" description="CVS Import" depends="init">
>
>         <condition>
>         <equals arg1="${var1}" arg2="${var2}"/>
>         <echo message="Values are equal"/>
>         </condition>
>
> </target>
>
> Matt
>
> -----Original Message-----
> From: Antoine Levy-Lambert [mailto:antoine@antbuild.com]
> Sent: Wednesday, July 30, 2003 1:32 PM
> To: Ant Users List
> Subject: Re: Conditional Statement
>
> <condition> see the manual.
> Otherwise have a look at <if> in antelope or ant-contrib.
> Cheers,
> Antoine
> ----- Original Message -----
> From: "Matt" <mathews_julien@hotmail.com>
> To: "'Ant Users List'" <user@ant.apache.org>
> Sent: Wednesday, July 30, 2003 10:29 PM
> Subject: Conditional Statement
>
> > Hi
> >
> > 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.
> >
> > Matt
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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