You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Cory Adams <co...@allogis.com> on 2001/09/14 00:55:30 UTC

Using IF

Could somebody please help me with regard to using if statments in Ant?

The docs say that they can only be used in a target tag and that they can
only check to see that a variable is essentially != null or that it has been
set.

That either is not very useful or I'm not getting it?

Can if constructs be used in other places?

For example how would I check to see if a variable == "xyz" and not only
that it was set.  Also can I do that outside of the target tag?

Thanks,

Cory


RE: Using IF

Posted by Cory Adams <co...@allogis.com>.
Diane,

Can you please point me to the area of the docs that pertains to this.  All
I could find was the small reverance on the Using Ant portion of the docs
that relates to targets and if.

Thanks,

Cory

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Thursday, September 13, 2001 8:42 PM
To: ant-user@jakarta.apache.org
Subject: Re: Using IF


--- Cory Adams <co...@allogis.com> wrote:
> Could somebody please help me with regard to using if statments in Ant?

As of release 1.4, you can use the <condition> task to test the value of a
property (see the doc for examples). The if/unless attributes of <target>
are only for testing whether a property is set/not-set.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/


Re: Using IF

Posted by Diane Holt <ho...@yahoo.com>.
--- Cory Adams <co...@allogis.com> wrote:
> Could somebody please help me with regard to using if statments in Ant?

As of release 1.4, you can use the <condition> task to test the value of a
property (see the doc for examples). The if/unless attributes of <target>
are only for testing whether a property is set/not-set.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/