gpt4 book ai didi

java - Ant SCP失败

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:03:12 24 4
gpt4 key购买 nike

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

<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>

我收到以下错误:

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

最佳答案

错误输出非常清楚地说明了如何解决这个问题:

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 下载。 .

关于java - Ant SCP失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11092216/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com