2012-06-18 2 views
6

So versuche ich scp zu einem Remote-Rechner, ich versuche, das gesamte Verzeichnis in das Zielverzeichnis zu kopieren.ant scp failure

<target name="report-test-results" depends="run-junit-tests"> 
    <scp todir="root:[email protected]:/home/hrishikesh/webui-test-results/"> 
      <fileset dir="${basedir}/test-results"/> 
    </scp> 
</target> 

ich folgende Fehler bekommen:

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 

Antwort

7

Der Fehlerausgang ist ziemlich klar, wie dieses Problem zu beheben:

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

In Ihrem Fall, dass Sie die jsch JAR-Datei fehlt, die sich aus der JSch site heruntergeladen werden kann.

+0

bang auf ziel ... es sagte eindeutig nicht in panik, aber ich tat es. Wie auch immer, mein Problem ist gelöst, danke. Danke auch an krock. – riship89

+1

Unter Debian ist es ausreichend, das Paket 'libjsch-java' zu installieren. – user3132194

-2

Fügen Sie die JSch JAR-Datei in Eclipse hinzu - Windows> Einstellungen> Ant> Classpath.

Sie können die JAR file aus dem Maven Central Repository erhalten.