ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: how to define task sshexec
Date Tue, 12 Feb 2008 09:57:36 GMT
serdsch wrote:
> Hi Peter,
>> No quite non-existent:
> Yeah, OK, there is this little bit of documentation from Ant which only
> tells you how to use the task from inside Ant. I wouldn't really expect more
> from Ant, but the documentation of jcraft is really non-existent, isn't it? 

The source is OK...I've integrated it into other things. And the author 
is very helpful on email. So, given its a free java SSH client, I'm happy :)

I guess you're trying to run it embedded...things are a bit more complex 
then as yes, you do need the right optional JAR on your classpath.

> Anyway, thanx a lot for your answer, it really helped. It gave me some
> ideas, so I tried and looked around inside the .jars and found the solution.
> I am not using a full ant distribution but only the ant-launcher and its
> necessary .jars, so I dont have a ant/lib folder. What I did now was to add
> '-lib ${path-to-jsch-0.1.37.jar}' in the bat-file calling Ant, but it still
> couldn't find the *.sshexec-class. This one is found in the ant-jsch.jar
> that comes with your Ant distribution. 
> So for anyone facing the same problem, what you need is the following:
> 1) jsch-0.1.37.jar from jcraft
> 2) ant-jsch.jar from ant
> 3) put them both in some folder ${path-to-my-ant} where ever you like
> 4) define the task in your buildfile as the following:
> <taskdef name="sshexec"
> classname=""/>
> 5) when calling Ant, set a command line property '-lib ${path-to-my-ant}'
> And everything works just fine...
> Cheers, Sergio

Steve Loughran        
Author: Ant in Action 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message