Window -> Preferences
Ant -> Runtimeon the left side
- In the classpath tab, select
Ant Home Entries
- Click on the
Add External JARs...button
- Navigate to your eclipse installation, then select
okayto confirm the file selection
okayto close the preferences dialog
- Run your buildfile with
It's that easy. The specific version number of the cvs/ssh plugin and the jsch jar may differ, but it should still work.
If you keep getting the error about authentication, you have to turn on PasswordAuthentication in the ssh server config file.
I followed the instructions for Eclipse, Ant, and sshexec.ReplyDelete
The name of the jar that I found in my Eclipse plugins was identical to the one in your instructions. I am running Eclipse 3.1 on a RHEL4 Linux box. I do not use cvs.
When I attempt to run sshexec from an Eclipse project with the following build.xml target:
I invariably get this error:
com.jcraft.jsch.JSchException: java.lang.ArrayIndexOutOfBoundsException: 1024
This also occurs if I use an explicit password rather than
What am I missing?
I've seen this error with ant before, it's confusing, but it comes from having a semantically invalid scp target in the build.xmlReplyDelete
In my case, I was using *both* the remoteToDir and remoteToFile in an attempt to rename a file at the destination. Turns out that the remoteToFile can contain the remoteToDir as a prefix. If you have both present, then what should simply be noticed as an illogical combination of attributes is instead turned into an obscure error.
Double, and triple check that you have a well formed scp task. However, the documentation for scp does *not* make it clear what valid combinations there are.