2012-06-18 13 views
6

Oto jak próbuję scp do zdalnego komputera, próbuję skopiować cały katalog do katalogu docelowego.Awaria 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> 

otrzymuję następujący błąd:

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 

Odpowiedz

7

Wyjście błędu jest całkiem jasne, w jaki sposób rozwiązać ten problem:

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

W twoim przypadku tracisz plik JAR jsch, który można pobrać z JSch site.

+0

huk na cel ... wyraźnie powiedział, żeby nie wpadać w panikę, ale ja to zrobiłem. W każdym razie mój problem został rozwiązany, dziękuję. Dzięki również krock. – riship89

+1

Na Debianie wystarczy zainstalować pakiet 'libjsch-java'. – user3132194

-2

Dodaj plik JAR JSch wewnątrz Eclipse - Windows> Preferencje> Ant> Classpath.

Możesz pobrać JAR file z centralnego repozytorium Maven.