ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10952] New: - condition task broken
Date Thu, 18 Jul 2002 16:34:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10952>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10952

condition task broken

           Summary: condition task broken
           Product: Ant
           Version: 1.5
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: hoju@visi.com


I'm using Ant 1.5 with j2sdk1.4.1beta and Xerces-1.4.4.

I have a <condition> that worked fine in Ant 1.4.1 (some echo's for debugging 
included and using "|" to show that the result doesn't have extra whitspace):

<property name="javadoc.breakiterator" value="" />
<echo message="|${ant.java.version}|" />
<echo message="${javadoc.breakiterator}" />
<condition property="javadoc.breakiterator" value="-breakiterator" >
    <or>
        <equals arg1="${ant.java.version}" arg2="1.4" />
        <equals arg1="${ant.java.version}" arg2="1.5" />
    </or>
</condition>
<echo message="|${javadoc.breakiterator}|" />

Expected output:

[echo] |1.4|
[empty space here]
[echo] |1.4|

Actual output:
[echo] |1.4|
[empty space here]
[empty space here]

So, the ${ant.java.version} is returning the proper jdk version string of "1.4" 
and that matches one of the arguments in the <or> which should make the 
condition true.  This should cause the ${javadoc.breakiterator} property to be 
set to the assigned value "-breakiterator".  However, it never gets set in Ant 
1.5 where it does get set in Ant 1.4.1.

Jake

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


Mime
View raw message