Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用sshexec任务调用另一个ant并获得预期结果?_Ant_Ssh - Fatal编程技术网

如何使用sshexec任务调用另一个ant并获得预期结果?

如何使用sshexec任务调用另一个ant并获得预期结果?,ant,ssh,Ant,Ssh,以下是场景: 在computer1上启动一个ant脚本,在computer2上使用sshexec ant任务登录,以调用一个shell脚本,该脚本将自己调用另一个ant脚本 主脚本看起来像 <target ...> <sshexec host="*" username="*" password="*" command="someShellScript.sh" /> </target> 所有脚本都正确执行,但当远程构建失败时,主Ant脚本将返回构建成功,而

以下是场景:

在computer1上启动一个ant脚本,在computer2上使用sshexec ant任务登录,以调用一个shell脚本,该脚本将自己调用另一个ant脚本

主脚本看起来像

<target ...>
  <sshexec host="*" username="*" password="*" command="someShellScript.sh" />
</target>
所有脚本都正确执行,但当远程构建失败时,主Ant脚本将返回构建成功,而不是失败

我猜它使用了sh脚本的结果

有没有办法获得第二个Ant脚本结果?但也许有更好的方法来实现这一点

谢谢

自动回复:

它来自ant.bat中的一只虫子

#!/bin/sh
setting some env vars
ant buildfile.xml