2012-06-18 17 views
6

Questo è il modo in cui sto cercando di scp su una macchina remota, sto cercando di copiare l'intera directory nella directory di destinazione.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> 

sto ottenendo seguente errore:

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 

risposta

7

L'uscita di errore è abbastanza chiaro su come risolvere questo problema:

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

Nel tuo caso ti manca il file JAR jsch, che può essere scaricato dal JSch site.

+0

bang sul bersaglio ... chiaramente ha detto di non prendere dal panico, ma l'ho fatto. Ad ogni modo, il mio problema è risolto, grazie. Grazie anche a Krock. – riship89

+1

Su Debian è sufficiente installare il pacchetto 'libjsch-java'. – user3132194

-2

Aggiungere il file JAR JSch all'interno di Eclipse - Windows> Preferenze> Ant> Classpath.

È possibile ottenere il JAR file dal Maven Central Repository.