如何在 ant 属性 ("") 中保留引号?

How to keep quotes in ant property ("")?

我在调试jenkins + ant + jmeter框架的过程中发现jenkins pass with double quotation mark("xxx") to jmeter的时候双引号("")不能显示,变成xxx,我查看build.xml,调试发现可能是ant to jmeter进程有问题?见下文

这里的参数是引号("MallID")

<target name="run" depends="clean, show-test-properties">
  
  <!-- create dir -->
  <mkdir  dir="${test.result.path}"/>
  <mkdir  dir="${test.log.path}"/>
  
  <jmeter
   jmeterhome="${jmeter.home}"
      testplan ="${test.plan.path}"
      resultlog="${test.result.path}/result.jtl"
   jmeterlogfile="${test.log.path}/jmeter.log"
   >
   <jvmarg value="${jvm.arg}"/> <!-- modify as you wish -->
   
   <!-- Force suitable defaults -->
   <!-- values for UDV -->
   <property name="api.url" value="${api.url}"/>
   <property name="api.fieldparam" value="${api.fieldparam}"/>
   <property name="api.bodyparam" value="${api.bodyparam}"/>

  </jmeter>
 </target>

这里所有的引号("")标记都取消了(MallID) 为什么?

在 Ant 中设置任何内容时,它要求您使用双引号(即“”)来指定值。如果您希望将引号保留在值中,我建议您尝试以下操作:

<property name="api.url" value="&quot;${api.url}&quot;"/>
<property name="api.fieldparam" value="&quot;${api.fieldparam}&quot;"/>
<property name="api.bodyparam" value="&quot;${api.bodyparam}&quot;"/>