蚂蚁SCP任务不工作,甚至与蚂蚁/ lib目录jsch [英] Ant scp task not working, even with jsch on ant/lib

查看:228
本文介绍了蚂蚁SCP任务不工作,甚至与蚂蚁/ lib目录jsch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过scp复制战争文件。

I need to copy a war file via scp.

我已经添加了 jsch-0.1.42.jar $ ANT_HOME / lib目录但我仍然收到此错误:

I have added the jsch-0.1.42.jar to $ANT_HOME/lib but I'm still getting this error:

原因:类
  org.apache.tools.ant.taskdefs.optional.ssh.Scp
  没找到。
          这看起来像Ant的可选组件之一。

Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found. This looks like one of Ant's optional components.

这是运行蚂蚁-diagnostics 以防万一的结果是:

This is the result of running ant -diagnostics just in case:

http://gist.github.com/320859

推荐答案

这看起来像你的问题,从诊断的顶部:

This looks like your problem, from the top of the diagnostics:

可选任务:不可用

您$ ANT_HOME / lib目录中缺少蚁jsch.jar,这是你缺少类来自

Your $ANT_HOME/lib directory is missing ant-jsch.jar, which is where your missing class comes from.

我不知道这是怎么发生 - 我总是从ZIP文件上下载网站,安装Ant这包括所有的可选任务。如果从Linux软件包安装了Ant,尝试检查,看看是否有对于可选任务一个单独的包。

I'm not sure how this happened - I always install Ant from the ZIP file on the download site, which includes all the optional tasks. If you installed Ant from a Linux package, try checking to see if there is a separate package for the optional tasks.

一旦你安装了可选的任务,我会为@trashgod建议删除旧版本jsch.jar的。

Once you get the optional tasks installed, I would delete the old version of jsch.jar as @trashgod suggests.

这篇关于蚂蚁SCP任务不工作,甚至与蚂蚁/ lib目录jsch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆