I am executing lot of scp
and sshexec
and other remote commands from an ant build script. These commands don\'t work if jsch.jar
isn\'
To ensure your build is more cross platform I'd suggest using dependency management. The ivy plug-in can automatically install the version of your build's plugin at build-time.
This approach means the last jar you'll ever need to install into your ANT lib is ivy-2.2.0.jar :-)
First declare your project's dependencies in the file ivy.xml
Within your build.xml run ivy and use it to populate a custom classpath based on the ivy configuration:
Finally, elsewhere in your build declare your ANT tasks using the class path now automatically populated by ivy.
..
..
This approach works for all ANT plug-ins, most of which are available in the central Maven repository. The second benefit is that it's easy to upgrade the plug-in versions across all builds.