ant -D<property>=<value> value有空格

来源:互联网 发布:淘宝网购物女装t恤衫 编辑:程序博客网 时间:2024/06/06 04:28

命令行运行ant时,有时需要传递参数,用到-D=
比如

C:\Users\kwang>ant -buildfile D:\WorkSpaces\GlobalBuild\build.xml -Drun.test.for=MDM

这样在build.xml里的property run.test.for就被赋值为MDM

C:\Users\kwang>ant -buildfile D:\WorkSpaces\GlobalBuild\build.xml -Drun.test.for="MDM Web"

如果要传递的参数值有空格,应当将参数值用”“包裹起来。
否则就会build failed,找不到名字是Web的target

BUILD FAILEDTarget "Web" does not exist in the project "auto.all.ci".
0 0
原创粉丝点击