Issue with sshexec and 1.10.7

"Arnold, Thomas L. (LARC-D321)[LITES II]" <[email protected]> Thu, 17 Oct 2019 16:07:24 +0000
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <BL0PR0901MB24973735EFE81906E086880ECD6D0@BL0PR0901MB2497.namprd09.prod.outlook.com>
I'm having an issue with 1.10.7.  This behavior doesn't exist in 1.10.6.

Sample build.xml :
<project name="MyProject" default="init" basedir=".">
  <description>
    simple example build file
  </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="build" location="build"/>
  <property name="dist" location="dist"/>

  <target name="init">
        <sshexec host="Server1" username="User" keyfile="${user.home}/.ssh/id_rsa"
                 command="ssh -o ConnectTimeout=180 -o ConnectionAttempts=20 -o BatchMode=yes  'ssh Server2 -o ConnectTimeout=180 -o ConnectionAttempts=20 -o BatchMode=yes &quot;echo OK&quot;' 2&gt;&amp;1 | tail -1"
                 output="/home/user/anthell/CheckHost-Server1.txt" failonerror="true" append="true" verbose="false" suppresssystemout="false"/>
  </target>

</project>

Running this should leave me with a file CheckHost-Server1.txt containing "OK", instead it fails creating the file:
BUILD FAILED
/home/user/anthell/build.xml:13: java.nio.file.NoSuchFileException: /home/user/anthell/CheckHost-Server1.txt
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

If I touch /home/user/anthell/CheckHost-Server1.txt before running, it works fine and the file contains OK as expected.

I also just grabbed and tried 1.10.8alpha #1137 and get the same behavior but as mentioned 1.10.6 works as expected.  Before building I ran fetch.xml to get all the optional libraries to make certain they were up to date.

Any insight is appreciated.

Thanks.

  -Tom

--
Tom Arnold

System Administrator
SAIC | LITES II Contract | NASA Langley Research Center