ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Using available's property setting ability inside a condition, is it possible?
Date Tue, 12 Nov 2002 07:38:59 GMT
On 11 Nov 2002, David Budworth <dlbant@nustiu.net> wrote:

> Actually, this is what I tried from the start But you get a
> deprecation warning about using available to overwrite an existing
> property

OK, so instead of

>>   <available file="jikes" filepath="${env.PATH}"
>>      property="compiler.type" value="jikes"/>
>>   <available file="javac" filepath="${env.PATH}"
>>      property="compiler.type" value="javac"/>

You could use

<available file="jikes" filepath="${env.PATH}"
           property="compiler.type" value="jikes"/>
<condition property="compiler.type" value="javac">
  <and>
    <not>
      <isset property="compiler.type"/>
    </not>
    <available file="javac" filepath="${env.PATH}"/>
  </and>
</condition>

Still easier than your version.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message