【发布时间】:2012-05-23 18:51:41
【问题描述】:
我正在使用:
<exec executable="cmd">
<arg line="${argLine}" />
</exec>
当argLine
<property name="argLine" value="http://127.0.0.1:/product/findSameStyleSku.json?skuId=305&style=120662"/>
有 2 个参数,我使用 &amp; 转义 &amp; 符号
但只打开http://127.0.0.1/product/findSameStyleSku.json?skuId=305
style 参数丢失
总之,我想跑
<target name="111test">
<exec executable="cmd" output="e:/test.txt">
<arg line="/c start '' 'http://127.0.0.1/product/findSameStyleSku.json?skuId=305&%3bstyle=120662'" />
</exec>
</target>
2012-05-23 更新
是的,Windows系统
我把代码改成
<target name="111test">
<exec executable="cmd" output="e:/test.txt">
<arg value="/c" />
<arg value="start" />
<arg value="" />
<arg value="http://127.0.0.1/product/findSameStyleSku.json?skuId=305&%3bstyle=120662" />
</exec>
</target>
运行蚂蚁
只打开
http://127.0.0.1/product/findSameStyleSku.json?skuId=305
我把“&amp;%3b”改成“&amp;”
也只能打开
http://127.0.0.1/product/findSameStyleSku.json?skuId=305
但在 cmd 中,我使用
start "" "http://127.0.0.1/product/findSameStyleSku.json?skuId=305&style=120662"
可以打开http://127.0.0.1/product/findSameStyleSku.json?skuId=305&style=120662
【问题讨论】:
标签: ant