2013-05-24 22 views
9

Starając się zrealizować cel w Eclipse ant zawierający scp zadanie, ja otrzymuję błądnie udało się załadować klasę zależną com/jcraft/jsch/Logger

BUILD FAILED 
D:\Users\Dims\Design\liferay-plugins-sdk-6.1.1-tomcat-6.0.37-x64-liferay-6.1-GA2\portlets\scisbo-portlet\build.xml:11: 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: 
     -D:\APPS\eclipse-liferay-ide\plugins\org.apache.ant_1.8.2.v20120109-1030\lib 
     -C:\Users\dims\.ant\lib 
     -a directory added on the command line with the -lib argument 

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 

Zrobiłem to, co jest napisane tutaj i umieścić plik JAR

D:\...eclipse-liferay-ide\plugins\org.apache.ant_1.8.2.v20120109-1030\lib>dir 
ant-antlr.jar   ant-apache-oro.jar  ant-commons-logging.jar ant-jdepend.jar ant-junit4.jar ant-testutil.jar 
ant-apache-bcel.jar ant-apache-regexp.jar ant-commons-net.jar  ant-jmf.jar  ant-launcher.jar ant.jar 
ant-apache-bsf.jar ant-apache-resolver.jar ant-jai.jar    ant-jsch.jar  ant-netrexx.jar ecj.jar 
ant-apache-log4j.jar ant-apache-xalan2.jar ant-javamail.jar   ant-junit.jar ant-swing.jar  jsch-0.1.50.jar 

ale to nie pomogło.

com/jcraft/jsch/Logger.class plik znajduje się wewnątrz tego pliku JAR.

Odpowiedz

16

Sposób, w jaki próbujesz naprawić ścieżkę klas, jest sposobem postępowania podczas korzystania z samodzielnego Anta. Tutaj jest zarządzany przez Eclipse.

Możesz nadal brać udział w ścieżce klas Ant. Wystarczy przejść do Preferencji Eclipse, w pozycji Ant/Runtime, w zakładce "Classpath". Użyj przycisku "Dodaj zewnętrzne słoiki", aby dodać plik jsch.jar do ścieżki klas Ant.

Powiązane problemy