My Ant script is throwing the following error while executing sshexec ant command.
ant-jsch.jar and jsch-0.1.50.jar are present under folder /usr/share/ant/lib
Error details:
BUILD FAILED
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
-/home/username/.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