6

これは、リモート マシンに 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
4

3 に答える 3

8

エラー出力は、これを修正する方法について非常に明確です。

Action: Determine what extra JAR files are needed, and place them in one of:
    -ANT_HOME\lib
    -the IDE Ant configuration dialogs

あなたの場合、JSch サイトからダウンロードできる jsch JAR ファイルがありません。

于 2012-06-18T22:58:43.890 に答える
4

タスクのライブラリ依存関係をチェックアウトしscpます。jsch.jarクラスパスに含める必要があります。

于 2012-06-18T22:58:38.840 に答える