I had the same problem, and here is what I did: use the Google Jar Jar to change the package names. Here, build.xml I used:
<project name="Admin WAS Jython" default="jar"> <target name="jar" > <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="jarjar-1.0.jar"/> <jarjar jarfile="dist/ant-jsch-copy.jar"> <zipfileset src="ant-jsch.jar"/> <rule pattern="org.apache.tools.ant.taskdefs.optional.ssh.**" result=" org.apache.tools.ant.taskdefs.optional.ssh.copy.@1 "/> </jarjar> </target>
Then in the ant project, use the following:
<taskdef name="scp2" classname="org.apache.tools.ant.taskdefs.optional.ssh.copy.Scp" classpath="ant-jsch-copy.jar;jsch-0.1.43.jar"/>
and use scp2 task instead of scp
source share