ant 採用scp方式向遠程服務器上傳文件時jsch報錯

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:\tools\eclipse\plugins\org.apache.ant_1.9.2.v201404171502\lib
        -C:\Users\lenovo\.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


報錯原因是ant的Classpath中沒有jsch jar包路徑, 所以報錯.

解決方法: 按照如下步驟操作 將 jsch.jar加入ant運行環境即可~



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章