Control-flow Feedback to Ant from Epsilon [message #1837933] |
Thu, 11 February 2021 02:48 |
|
We would like to know what the idiomatic way is to pass data to Ant from Epsilon Tasks. In our case, we require the data for flow control.
We have a case in which we would like to make use of Ant flow-control using the if contribtask or the if and unless facility. For this, we would need to provide feedback from EOL tasks that is visible to ant in the form of properties or ant-level references.
We have attempted to use the export nested elements functionality, but it seems the project referred to in the documentation is not the ant project.
If we attempt the following:
<epsilon.eol src="DetermineControl.eol">
<uses ref="ifThisInternal" as="thenThisInAnt"/>
</epsilon.eol>
<echo>${toString:thenThisInAnt}</echo>
This does not render output.
Currently we are working around using Java System properties as a byway to communicate, but this seems brittle and obscure.
Could you please let us know what you would recommend, as this is impeding our progress.
|
|
|
Re: Control-flow Feedback to Ant from Epsilon [message #1837942 is a reply to message #1837933] |
Thu, 11 February 2021 08:44 |
|
Hi Joern,
You can use the "ant" attribute of export nested elements for this, as shown below.
<project default="main">
<target name="main">
<epsilon.eol>
var x = 1;
<exports ref="x" ant="true"/>
</epsilon.eol>
<echo>${x}</echo> <!-- Prints 1 -->
</target>
</project>
Thanks,
Dimitris
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03419 seconds