How to Use a Conditional Statement in ANT?

Discussion in 'Java' started by vunet.us@gmail.com, Mar 12, 2007.

  1. Guest

    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>
    , Mar 12, 2007
    #1
    1. Advertising

  2. 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
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Mar 13, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    805
  2. Chris Bedford
    Replies:
    6
    Views:
    2,238
  3. john martin
    Replies:
    2
    Views:
    2,216
    john martin
    Apr 7, 2005
  4. Alec S.
    Replies:
    10
    Views:
    10,146
    Alec S.
    Apr 16, 2005
  5. jayapal
    Replies:
    6
    Views:
    546
    Chris Dollin
    Oct 30, 2007
Loading...

Share This Page