首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ant scp故障

ant scp故障
EN

Stack Overflow用户
提问于 2012-06-19 06:53:10
回答 3查看 16.7K关注 0票数 6

这就是我尝试scp到远程机器的方式,我尝试将整个目录复制到目标目录。

代码语言:javascript
复制
<target name="report-test-results" depends="run-junit-tests">
    <scp todir="root:somepassword@192.168.8.120:/home/hrishikesh/webui-test-results/">
            <fileset dir="${basedir}/test-results"/>
    </scp>
</target>

我收到以下错误:

代码语言:javascript
复制
BUILD FAILED
C:\Users\hrishikesh\workspace\selenium4j\build.xml:122: 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:
        -ANT_HOME\lib
        -the IDE Ant configuration dialogs

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-06-19 06:58:44

关于如何修复这个问题,错误输出非常清楚:

代码语言:javascript
复制
Action: Determine what extra JAR files are needed, and place them in one of:
    -ANT_HOME\lib
    -the IDE Ant configuration dialogs

在本例中,您缺少jsch JAR文件,该文件可以从JSch site下载。

票数 8
EN

Stack Overflow用户

发布于 2012-06-19 06:58:39

签出scp任务的library dependancies。您需要在类路径中包含jsch.jar

票数 4
EN

Stack Overflow用户

发布于 2014-11-29 02:22:58

在Eclipse中添加Ant文件-- JSch > Preferences >Ant> Classpath。

您可以从Maven Central Repository获取JAR file

票数 -2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11092216

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档