https://issues.apache.org/bugzilla/show_bug.cgi?id=55971
Bug ID: 55971
Summary: if:true doesn't work with macrodef
Product: Ant
Version: 1.9.3
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Although release 1.9.3 fixed a bug related to the new if: and unless:
attributes (https://issues.apache.org/bugzilla/show_bug.cgi?id=55885) it seems
there are still some inconsistencies in that area.
Using if:true on macrodef doesn't work as expected
<project xmlns:if="ant:if" xmlns:unless="ant:unless">
<property name="foo" value="true"/>
<macrodef name="foobar">
<attribute name="bla"/>
<sequential>
<echo>@{bla}</echo>
</sequential>
</macrodef>
<echo>${ant.version}</echo>
<foobar bla="yada,yada" if:true="foo"/>
</project>
output, no error but macrodef doesn't get executed :
[echo] Apache Ant(TM) version 1.9.3 compiled on December 23 2013
BUILD SUCCESSFUL
Whereas when using if:true inside macrodef the macro
gets executed (but only when using if:true="${@{whentrue}}"
it doesn't work with if:true="@{whentrue}")
<project xmlns:if="ant:if" xmlns:unless="ant:unless">
<property name="foo" value="true"/>
<macrodef name="foobar">
<attribute name="bla"/>
<attribute name="whentrue"/>
<sequential>
<echo if:true="${@{whentrue}}">@{bla}</echo>
</sequential>
</macrodef>
<echo>${ant.version}</echo>
<foobar whentrue="foo" bla="yada,yada"/>
</project>
output :
[echo] Apache Ant(TM) version 1.9.3 compiled on December 23 2013
[echo] yada,yada
BUILD SUCCESSFUL
Regards, Gilbert
--
You are receiving this mail because:
You are the assignee for the bug.