【问题标题】:SCP Ant task errors with Cause: Could not load a dependent class com/jcraft/jsch/LoggerSCP Ant 任务错误原因:无法加载依赖类 com/jcraft/jsch/Logger
【发布时间】:2013-10-23 08:43:30
【问题描述】:

我正在尝试在 Eclipse 中的 Ant 中使用 SCP 任务。

我已经下载了这个文件:
http://sourceforge.net/projects/jsch/files/jsch.jar/0.1.50/jsch-0.1.50.jar/download

并将其放入C:\software\eclipse\plugins\org.apache.ant_1.8.4.v201303080030\lib (ant-jsch.jar 已存在于此文件夹中)列出的另一个文件夹(我的主目录中的那个)不存在。

不幸的是,我在尝试使用 SCP 任务时得到以下输出:

Buildfile: C:\Users\rhughes\workspace\project\build-all.xml
scp-test:

BUILD FAILED
C:\Users\rhughes\workspace\project\build-all.xml:5: Problem: failed to create task or type scp
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.
Action: Determine what extra JAR files are needed, and place them in one of:
    -C:\software\eclipse\plugins\org.apache.ant_1.8.4.v201303080030\lib
    -C:\Users\rhughes\.ant\lib
    -a directory added on the command line with the -lib argument

我该如何解决这个问题?

【问题讨论】:

标签: eclipse ant scp


【解决方案1】:

我也遇到过类似的问题,由于默认 ant 安装中的 scp 连接缺少 jsch.jar,您需要下载更新的 jsch.jar 并放入 apache-ant/lib 目录。请参考以下类似的帖子- Ant scp task not working, even with jsch on ant/lib

谢谢 阿杰索尼

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-05-20
    • 1970-01-01
    • 2023-03-09
    • 2016-09-26
    • 2011-01-23
    • 2012-10-25
    • 2011-09-15
    • 2014-10-19
    相关资源
    最近更新 更多