You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Matt Seibert <ms...@us.ibm.com> on 2002/08/09 17:19:49 UTC

Ant Logic

Odd ant question for you guys.... I want to make a block that reads:

<available property="<property>" classname="<class>"/>

to be more like this:

if ( ! ${property} ); then
<available property="<property>" classname="<class>"/>
fi

how do I do this in Ant?  I THINK I use the <condition> tags, and I found
an ISSET condition, but I cannot find a good example of how to use it, and
the syntax I am using is apparently wrong.....

Matt Seibert                                           mseibert@us.ibm.com
IBM        External:    (512) 838-3656      Internal:   678-3656



Re: Ant Logic

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Matt Seibert" <ms...@us.ibm.com>
To: <ax...@xml.apache.org>
Sent: Friday, August 09, 2002 8:19 AM
Subject: Ant Logic


>
> Odd ant question for you guys.... I want to make a block that reads:
>
> <available property="<property>" classname="<class>"/>
>
> to be more like this:
>
> if ( ! ${property} ); then
> <available property="<property>" classname="<class>"/>
> fi
>
> how do I do this in Ant?  I THINK I use the <condition> tags, and I found
> an ISSET condition, but I cannot find a good example of how to use it, and
> the syntax I am using is apparently wrong.....

well, you could merge it into one condition:

<condition property="myprop">
    <and>
        <not><isset property="myprop"/></not>
        <available classname="<class>"/>
    </and>
</condition>

but since condition doesnt print the warning (just an override ignored
message in -verbose), you could just do

<condition property="myprop">
        <available classname="<class>"/>
</condition>

but I would maybe not bother with this because ant1.5.1, due out later this
month, will not print the deprecation messages if the newvalue==the
oldvalue. The CVS versions do this as of last night, as I didnt like the
messages either.

-steve