ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Byron Vonthal" <Byron.Vont...@marketlive.com>
Subject sshexec not picking up exit code
Date Fri, 02 Mar 2007 19:04:46 GMT
I'm using ant 1.7.0 with jsch-0.1.29

I do get back output but I don't get an outputproperty.

The BUILD FAILED yet it shows as BUILD SUCCESS.

How do I pickup that exit code?  I've seen various solutions but none
seemed to work.

I'm calling a remote machine by using sshexec thru openSSH like this:

 

 

      <target name = "sshexec">

                           <sshexec host="${servers.server.ipaddress}"

                              trust="yes"

                              username="${servers.server.sshUser}"

                              password="${servers.server.sshPwd}"

 
command="c:/ant/remoteAntScripts/bin/build.bat"

                              output="sshExecOut.txt"

                              outputproperty="sshExecOutProp.txt"

                              failonerror="true"

                           />

      </target>

 

The program on the remote server does this:

 

call ant -buildfile %XML_HOME%\remoteDeploy.xml   --I've set this up to
<fail/>

echo ERRORLEVEL=%ERRORLEVEL%

echo Before exit 1

exit 1  --I tried 'exit /B 1' also

echo after exit 1

 

The output file shows this:

 

  [sshexec] BUILD FAILED

  [sshexec] C:\ant\remoteAntScripts\xml\remoteDeploy.xml:28: failed
deploy

  [sshexec]

  [sshexec] Total time: 1 second

  [sshexec] ERRORLEVEL=1

  [sshexec] Before exit 1

 

BUILD SUCCESSFUL


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message