2012-06-18 21 views
6

Así trato de copiar a una máquina remota, estoy intentando copiar todo el directorio en el directorio de destino.error ant scp

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

estoy consiguiendo error siguiente:

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 

Respuesta

7

La salida de error es bastante clara sobre cómo solucionar este problema:

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

En su caso que se está perdiendo el archivo JAR jsch, que puede ser descargado desde el JSch site.

+0

golpe en el objetivo ... claramente decía que no entrara en pánico, pero lo hice. De todos modos, mi problema está resuelto, gracias. Gracias a krock también. – riship89

+1

En Debian es suficiente instalar el paquete 'libjsch-java'. – user3132194

-2

Agregue el archivo JAR JSch dentro de Eclipse - Windows> Preferencias> Ant> Classpath.

Puede obtener el JAR file del Repositorio Central de Maven.