开发者

How to use sshexec task to call another ant and get expected result?

Here is the scenario :

An ant script is launched on computer1, logged on computer2 using sshexec ant task to call a shell script that calls itself another ant script.

The main script looks like

<target ...>
  <sshexec host="*" u开发者_开发知识库sername="*" password="*" command="someShellScript.sh" />
</target>

The remote script is basic :

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

All scripts are correctly executed, but when the remote build fails, the main Ant script return BUILD SUCCESSFUL instead of FAILED.

I guess it uses the result of the sh script.

Is there a way to get the second Ant script result ? But maybe, there is a better way to achieve this ?

Thanks


Self answering :

it comes from a bug in ant.bat

See this answer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜