You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nathan Christiansen <Na...@tni.com> on 2003/03/19 19:02:38 UTC

SSH in ANT?!?! (WAS: RE: process on a remote server via an ANT ?????)

SSH support is landing in the 1.6 release of ant?

-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.com


-----Original Message-----
From: Antoine Levy-Lambert [mailto:levylambert@tiscali-dsl.de]
Sent: Wednesday, March 19, 2003 9:49 AM
To: Ant Users List; sblanchet@sopragroup.com
Subject: Re: process on a remote server via an ANT ?????


there is a sshexec task in the head revision, nightly builds.
Antoine

Re: SSH in ANT?!?! (WAS: RE: process on a remote server via an ANT ?????)

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 20 Mar 2003, Nick Pellow <ni...@mindmatics.de> wrote:

> I just tried both the SSH and SCP tasks with the nightly
> build from the 19th of March. The jsch.jar I
> tested it with had version 0.1.2 and was downloaded and built today.

It looks as if jsch had problems with the response of your server.
This is most likely a jsch problem and would need to be taken care of
by the jsch folks.  They'll need to know what kind of SSH server you
are using on the remote end and so on ...

You may as well wait a few days as rumors are that a new jsch release
is very close.

Stefan

AW: SSH in ANT?!?! (WAS: RE: process on a remote server via an ANT ?????)

Posted by Nick Pellow <ni...@mindmatics.de>.
Hi Stefan,
I just tried both the SSH and SCP tasks with the nightly
build from the 19th of March. The jsch.jar I
tested it with had version 0.1.2 and was downloaded and built today.
During both tasks, I get
an ArrayIndexOutOfBoundsException:

Apache Ant version 1.6alpha compiled on March 19 2003
Buildfile: build.xml
Adding reference: ant.PropertyHelper ->
org.apache.tools.ant.PropertyHelper@111a3ac
Detected Java version: 1.4 in: C:\j2sdk1.4.1\jre
Detected OS: Windows 2000
Setting ro project property: ant.version -> Apache Ant version 1.6alpha
compiled on March 19 2003
Setting ro project property: password -> XXXXX
Setting ro project property: ant.file -> D:\work\build.xml
Adding reference: ant.projectHelper ->
org.apache.tools.ant.helper.ProjectHelper2@1d8957f
Adding reference: ant.parsing.context ->
org.apache.tools.ant.helper.AntXMLContext@1dd7056
Adding reference: ant.targets -> []
parsing buildfile D:\work\build.xml with URI = file:///D:/work/build.xml
Setting ro project property: ant.project.name -> Deployment Script
Adding reference: Deployment Script -> org.apache.tools.ant.Project@50d89c
Setting ro project property: ant.file.Deployment Script -> D:\work\build.xml
Project base dir set to: D:\
 +Target:
 +Target: stop
 +Target: copy
Build sequence for target `copy' is [copy]
Complete build sequence is [copy, stop, ]

copy:
      [scp] Connecting to delphin:22
      [scp] java.lang.ArrayIndexOutOfBoundsException
      [scp]     at
java.net.SocketInputStream.read(SocketInputStream.java:121)
      [scp]     at com.jcraft.jsch.IO.getByte(Unknown Source)
      [scp]     at com.jcraft.jsch.Session.read(Unknown Source)
      [scp]     at com.jcraft.jsch.Session.connect(Unknown Source)
      [scp]     at
org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:
209)
      [scp]     at
org.apache.tools.ant.taskdefs.optional.ssh.Scp.upload(Scp.java:220)
      [scp]     at
org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:153)
      [scp]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:227)
      [scp]     at org.apache.tools.ant.Task.perform(Task.java:388)
      [scp]     at org.apache.tools.ant.Target.execute(Target.java:309)
      [scp]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
      [scp]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1394)
      [scp]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1268)
      [scp]     at org.apache.tools.ant.Main.runBuild(Main.java:611)
      [scp]     at org.apache.tools.ant.Main.start(Main.java:198)
      [scp]     at org.apache.tools.ant.Main.main(Main.java:245)

BUILD FAILED
file:///D:/work/build.xml:23: com.jcraft.jsch.JSchException:
Session.connect: java.lang.ArrayIndexOutOfBoundsException


My build script was:

 <target name="copy"
          description="Test scp">
    <fail unless="password">
      Ensure that the property password is set
    </fail>

    <scp file="build.xml" todir="mmroot:${password}@delphin:"/>

  </target>

Regards,
Nick.

> -----Ursprungliche Nachricht-----
> Von: Stefan Bodewig [mailto:bodewig@apache.org]
> Gesendet: Donnerstag, 20. Marz 2003 08:15
> An: user@ant.apache.org
> Betreff: Re: SSH in ANT?!?! (WAS: RE: process on a remote server via an
> ANT ?????)
>
>
> On Wed, 19 Mar 2003, Nathan Christiansen <Na...@tni.com>
> wrote:
>
> > SSH support is landing in the 1.6 release of ant?
>
> It is already there (scp and single command sshexec).  You are much
> encouraged to try a recent nightly build and help us getting things
> stabilized.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>



Re: SSH in ANT?!?! (WAS: RE: process on a remote server via an ANT ?????)

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 19 Mar 2003, Nathan Christiansen <Na...@tni.com>
wrote:

> SSH support is landing in the 1.6 release of ant?

It is already there (scp and single command sshexec).  You are much
encouraged to try a recent nightly build and help us getting things
stabilized.

Stefan