I am trying to read a property from my build.properties file and pass it as an <arg> to a script that I <exec>. The problem is that the property value contains literal quotation marks inside, and they get corrupted during the process.

This is the property in build.properties:
jade.arg=AgentName:com.package.BookBuyerAgent("Some Book Title")

This is a snippet in build.xml:
<echo message="${jade.arg}" />
<exec executable="${jade.script}" spawn="true" dir="${build.dir} ">
<arg value="${jade.arg}"/>
</exec>

The arg echoed in Ant just fine:
    [echo] AgentName:com.package.BookBuyerAgent("Some Book Title")

But then, in the script (which is a Windows .cmd file), the first line echoes the very same arg:
echo %1


And instead of the expected, I get:
"AgentName:com.package.BookBuyerAgent("Some

There is an extra space and quotation in front. This is not too bad, as I can work around that with some processing my script; or, if possible, in Ant, even?.

But the main problem is the missing chunk at the end. What happened to the rest of the value, ' Book Title")' ?

Any ideas, suggestions appreciated.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to