ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oski Wee" <oski...@hotmail.com>
Subject Quotations in a property get corrupted when passed as an arg
Date Sat, 09 Apr 2005 13:20:43 GMT
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message