Ant var and property scope
ant
Solution
Do you really need to use <antcall>? Can you use target dependencies instead?
As you suspect, using <antcall> essentially creates a new scope.
Problem
I have a main build script that calls various targets. One of these targets needs to store a value and another target needs to display it. Obviously this is not working so I think it may be related to scope. I've tried var, property, and declaring the property outside of target1. Since var seems to be mutable, it looks like I need to use it instead, but each time my output is empty. Main script ``` <antcall target="target1"/> <antcall target="display"/> ``` In target1: ``` <var name="myVar" value="${anotherVar}"/> ``` In display: ``` <echo>${myVar}</echo> ```