如果你看到这里,想必你对ant 的本地部署有一定了解了。远程部署仅仅需要在配置时把服务器的IP由localhost改为你需要部署的地址即可。
但是你在eclipse里执行build.xml时可能会报
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.
这个错误,解决方法如下:
1、到sourceforge上下载jsch-xxx.jar。
2、将下载的包放到eclipse安装目录/plugins/org.apache.ant_xxx/lib下
3、在eclipse的 Window > Preferences > Ant > Runtime > Classpath
, 选择 “Ant Home Entries (default)” and click “Add External JARs…”选择/plugins/org.apache.ant_xxx/lib下的jsch-xxx.jar包。
4、重新运行build.xml,问题解决。