I need to pass values from a script into a target, but the immutability
of properties is getting in the way. I can't use the antcall task in my
script, because I eventually need to return a value from the target to
the script too. Here's a simplified test script.
<?xml version="1.0" ?>
<project name="build" basedir="." default="test">
<target name="test">
<script language="javascript">
<![CDATA[
project = self.getProject();
echo = project.createTask("echo");
project.setProperty("theVal", "foo");
echo.setMessage(project.getProperty("theVal"));
echo.perform();
echoval.execute();
project.setProperty("theVal", "bar");
echo.setMessage(project.getProperty("theVal"));
echo.perform();
echoval.execute();
]]>
</script>
</target>
<target name="echoval">
<echo>${theVal}</echo>
</target>
</project>
This script produces the following output.
test:
[echo] foo
[echo] foo
[echo] bar
[echo] foo
I want it to produce the following output.
test:
[echo] foo
[echo] foo
[echo] bar
[echo] bar
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]