Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#190 property set with var task passes through inheritAll="false"

open
nobody
property (13)
5
2006-11-04
2006-11-04
Steven Rosenthal
No

I'm running ant 1.6.5, contrib 1.0b2.

with:

<target name="testA">
<property name="testprop1" value="test1"/>
<var name="testprop1" value="newval1"/>
<property name="testprop2" value="test2"/>
<antcall target="testB" inheritAll="false"/>
</target>

<target name="testB">
<property name="testprop1" value="1"/>
<property name="testprop2" value="2"/>
<echo message="testprop1: ${testprop1}"/>
<echo message="testprop2: ${testprop2}"/>
</target>

invoking 'ant testA' yields:

Buildfile: build.xml

testA:

testB:
[echo] testprop1: newval1
[echo] testprop2: 2

BUILD SUCCESSFUL
Total time: 0 seconds

In Variable.java, the forceProperty() method should be
rewritten to be more like removeProperty(), in
particular the use of the ant.PropertyHelper to access
the Hashtable to be munged.

Discussion