ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton" <bpendle...@amberpoint.com>
Subject Ant 1.5 -- deprecated warning from Available task
Date Wed, 10 Jul 2002 17:44:28 GMT
With Ant 1.5, I use the following build file:

<project name="avail" default="run">
    <target name="run" depends="init"/>
    <target name="check" depends="init"/>
    <target name="init">
        <available property="jdk1.2+"
classname="java.lang.ThreadLocal"/>
    </target>
</project>

and I run the Ant command:

  ant check run

Then I get the output:

[available] DEPRECATED - <available> used to override an existing
property.
[available]   Build file should not reuse the same property name for
different values.

I did not get the warning with Ant 1.4.1.

It seems to me that maybe the check at line 249 of
Available.java is too strict, and maybe it should
read:

if (null != getProject().getProperty(property) &&
    !value.equals(getProject().getProperty(property))) {

so that it only complains if I'm actually trying to
set the property to a different value.

thanks,

bryan


--
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