Hi,
Is there a straight forward way to set metadata.publisher to the value of an ant property in the mxmlc task?
From the docs i'd have expected it to work like this:
Code:
<property name="publisher" value="Initrode Global"/>
<mxmlc [...]>
[...]
<metadata publisher="${publisher}"/>
</mxmlc>
But publisher is not a valid attribute for the metadata element.
So what about a nested element?
Code:
<property name="publisher" value="Initrode Global"/>
<mxmlc [...]>
[...]
<metadata>
<publisher>${publisher}</publisher>
</metadata>
</mxmlc>
leads to this error when the task is executed:
"command line: Error: configuration variable 'metadata.publisher' value contains unknown token 'publisher'"
Replacing ${publisher} with a string works, so i guess it's the mxmlc task interpreting ${*} as something different (what does token mean in this context?!).
i also tried using the nested 'arg' element that mxmlc should have inherited from javac
Code:
<mxmlc [...]>
[...]
<arg value="-publisher='${publisher}'"/>
</mxmlc>
but it looks like that's being ignored aswell.
the only workaround i've found so far is to wrap the call to mxmlc inside a macrodef with an attribute for publisher (macrodef uses @{*} to reference its attributes and without the $ it works).
Code:
<macrodef name="mxmlcmacro">
<attribute name="publisher"/>
<mxmlc [...]>
[...]
<metadata>
<publisher>@{publisher}</publisher>
</metadata>
</mxmlc>
</macrodef>
but this workaround really messes up the readability of the buildfile, i'd really apreciate a clean solution.
tia, justme123