Getting jsch to work in ant in Ubuntu.
May. 19th, 2016 11:05 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Yet another in the series "stuff I'm blogging so future poor buggers can find it in Google."
If you've seen this supercilious and not actually helpful error from ant:
Cause: Could not load a dependent class com/jcraft/jsch/Logger It is not enough to have Ant's optional JARs you need the JAR files that the optional tasks depend upon. Ant's optional task dependencies are listed in the manual. Action: Determine what extra JAR files are needed, and place them in one of: -/usr/share/ant/lib -/home/fun/.ant/lib -a directory added on the command line with the -lib argument Do not panic, this is a common problem. The commonest cause is a missing JAR. This is not a bug; it is a configuration problem
— it is a bloody bug, and it's a bug in Ubuntu that hasn't been fixed in years.
- Install the relevant packages: sudo apt-get install ant-optional libjsch-java
- The symlink to make it work! sudo ln -s /usr/share/java/jsch.jar /usr/share/ant/lib/
The bug is that it should make that symlink. (The other bug is that ant-optional should have libjsch-java as a dependency and doesn't.)
(no subject)
Date: 2016-05-20 02:58 pm (UTC)(no subject)
Date: 2016-05-20 03:01 pm (UTC)