Why not to use <scriptdef> instead? With <scriptdef> you can pragmatically access parameters instead of macro substitution.

- Alexey.

On 20.01.2010 12:10, Eric Fetzer wrote:
Hi all.  I wrote a MacroDef to append a string to a property.  All works as planned until 
you slip a "\" in there and then it gets jacked up.  My javascripting has MUCH 
to be desired.  Any help?

   <macrodef name="md.AppendProperty">
     <attribute name="var.propertyName"/>
     <attribute name="var.stringAppend"/>
     <sequential>
       <script language="javascript">  <![CDATA[
         curVal=project.getProperty("@{var.propertyName}");
         
project.setProperty("@{var.propertyName}",curVal+"@{var.stringAppend}");
         ]]>
       </script>
     </sequential>
   </macrodef>

Thanks,
Eric




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to