我怎样才能完成Ant任务;SSHExec“;运行命令并在它之前退出';完成了吗?

我怎样才能完成Ant任务;SSHExec“;运行命令并在它之前退出';完成了吗?,ant,Ant,我有一个ant构建脚本,它连接到远程服务器并使用启动本地构建。此构建大约需要1分钟,完成后会向我发送一封电子邮件,但我的ant任务: <sshexec host="${deploy.host}" username="${deploy.username}" trust="true" keyfile="${user.home}/.ssh/id_rsa" command="~/updateGit.sh"/> 但这似乎没有什么区别。如果这个额外的细节对任何人都

我有一个ant构建脚本,它连接到远程服务器并使用启动本地构建。此构建大约需要1分钟,完成后会向我发送一封电子邮件,但我的ant任务:

<sshexec
   host="${deploy.host}"
   username="${deploy.username}"
   trust="true"
   keyfile="${user.home}/.ssh/id_rsa"
   command="~/updateGit.sh"/>
但这似乎没有什么区别。如果这个额外的细节对任何人都有帮助,那么脚本将生成大量输出,而缓慢的internet连接可能会导致脚本花费更长的时间(由于它的输出正在通过管道传回,这种方法的假设是,我只关心输出完成后的输出,因此,如果我将其打包到电子邮件中,我可以在构建开始时监视收件箱,基本上这是一个穷人的持续集成)

使用来自(以及
nohup
命令)的信息我更新了我的任务如下:

<sshexec
  host="${deploy.host}"
  username="${deploy.username}"
  trust="true"
  keyfile="${user.home}/.ssh/id_rsa"
  command="nohup ~/updateGit.sh &gt; /dev/null 2&gt; error.log &lt; /dev/null &amp;"/>

<sshexec
  host="${deploy.host}"
  username="${deploy.username}"
  trust="true"
  keyfile="${user.home}/.ssh/id_rsa"
  command="nohup ~/updateGit.sh &gt; /dev/null 2&gt; error.log &lt; /dev/null &amp;"/>