title: ANT can't find specific libraries
body: <p>I am trying to use the <a href="http://ant.apache.org/manual/Tasks/sshexec.html" rel="nofollow">SSHEXEC ANT task</a>, which requires the <a href="http://www.jcraft.com/jsch/" rel="nofollow">JSCH library</a>.</p>
  
  <p>When I try to use an <code>SSHEXEC</code> task, I get the following:</p>
  
  <pre><code>BUILD FAILED
  /home/www/test/build/build.xml:140: Problem: failed to create task or type sshexec
  Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.SSHExec was not found.
          This looks like one of Ant's optional components.
  Action: Check that the appropriate optional JAR exists in
          -/usr/share/ant/lib
          -/root/.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
  </code></pre>
  
  <p>I have placed <code>jsch-0.1.50.jar</code> (the latest) in <code>/usr/share/ant/lib</code>, <code>/root/.ant/lib</code> and even tried the following:</p>
  
  <pre><code>ant my-sshexec-target-name -lib /path/to/jsch-0.1.50.jar
  </code></pre>
  
  <p>And I keep getting the same error. I have also tried renaming the file to simply <code>jsch.jar</code> in all the same locations. Same result. What am I doing wrong here?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Also I ran <code>ant -diagnostics</code> and see this:</p>
  
  <pre><code>...
  -------------------------------------------
   Tasks availability
  -------------------------------------------
  p4reopen : Not Available (the implementation class is not present)
  image : Not Available (the implementation class is not present)
  sshexec : Not Available (the implementation class is not present)
  wlrun : Not Available (the implementation class is not present)
  p4label : Not Available (the implementation class is not present)
  p4revert : Not Available (the implementation class is not present)
  p4submit : Not Available (the implementation class is not present)
  scp : Not Available (the implementation class is not present)
  p4change : Not Available (the implementation class is not present)
  p4delete : Not Available (the implementation class is not present)
  p4integrate : Not Available (the implementation class is not present)
  rexec : Not Available (the implementation class is not present)
  stlist : Not Available (the implementation class is not present)
  telnet : Not Available (the implementation class is not present)
  etc...
  </code></pre>
  
  <p>Note: <strong>sshexec : Not Available (the implementation class is not present)</strong></p>
  
  <p>What does that mean?</p>