如何从ant exec任务运行多个命令 [英] How to run multiple commands from ant exec task

查看:172
本文介绍了如何从ant exec任务运行多个命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Ant exec任务运行两个dos命令.

I want to run two dos commands from Ant exec task.

我尝试了以下代码

<exec dir="${testworkspace}\${moduleName}" executable="cmd" failonerror="true" output="${testworkspace}\${moduleName}\BuildConsole_TC${tc_num}.log" resultproperty="execrc">
                    <arg value="/c echo Download Status is ${DownloadStatus}"/>
                    <arg value="/c Load.bat ${moduleName} ${Intapp} ${CcvStatus}"/>
                </exec>

,但仅执行第一个命令,然后跳过第二个命令. 我正在Windows操作系统上尝试此操作.

but it executes only first command and skips second. I am trying this on windows OS.

推荐答案

这应该有效.只需链接命令即可.

This should work. Simply chaining the commands.

<exec dir="${testworkspace}\${moduleName}" executable="cmd" failonerror="true" output="${testworkspace}\${moduleName}\BuildConsole_TC${tc_num}.log" resultproperty="execrc">
    <arg value="/c echo Download Status is ${DownloadStatus} &amp; Load.bat ${moduleName} ${Intapp} ${CcvStatus}"/>
</exec>

这篇关于如何从ant exec任务运行多个命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆