Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to Use a Conditional Statement in ANT?

Reply
Thread Tools

How to Use a Conditional Statement in ANT?

 
 
vunet.us@gmail.com
Guest
Posts: n/a
 
      03-12-2007
In ANT I want to say: if username = somename, perform the task.

I started with this and can't go any further. I am new to ant, please,
advise.

<condition property="${user.name}">
<equals />
</condition>

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      03-13-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> In ANT I want to say: if username = somename, perform the task.
>
> I started with this and can't go any further. I am new to ant, please,
> advise.
>
> <condition property="${user.name}">
> <equals />
> </condition>


Ant scripts is not really a sequential programming language.

You are expected to do this stuff with properties.

If you really want an if tag then look at:

http://ant-contrib.sourceforge.net/
http://ant-contrib.sourceforge.net/tasks/tasks/if.html

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Can we use break statement in conditional operator? jayapal C Programming 6 10-30-2007 12:31 PM
How do I do a conditional statement in a constant statement? tkvhdl@gmail.com VHDL 3 12-16-2005 06:13 PM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
Comparison of Bit Vectors in a Conditional Signal Assignment Statement Anand P Paralkar VHDL 2 08-04-2003 08:40 PM



Advertisments