公司ant打包上线 一直出现这个问题。

Ant运行build.xml执行服务器scp,异常解决jsch.jar

BUILD FAILED
D:\eclipse\eclipse-jee-luna-SR2-win32-x86_64\hexindev\eservice\build.xml:95: 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:\eclipse\eclipse-jee-luna-SR2-win32-x86_64\eclipse\plugins\org.apache.ant_1.9.2.v201404171502\lib
-C:\Users\123456\.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

解决方法: 加入jsch-x.x.x.jar ,网上可以下载

打开 Eclipse->window->preferences->ant->runtime->classpath
select “Ant Home Entries (default)” and click “Add External JAR

选择下载好的jsch.jar

click Apply->OK

Ant运行build.xml执行服务器scp,异常解决jsch.jar的更多相关文章

  1. Ant之build.xml详解

    Ant之build.xml详解 关键字: ant build.xml Ant的概念 可能有些读者并不连接什么是Ant以及入可使用它,但只要使用通过Linux系统得读者,应该知道make这个命令.当编译 ...

  2. Ant之build.xml详解---可用

    Ant的概念 :在Eclipse中使用Ant Ant是Java平台下非常棒的批处理命令执行程序,能非常方便地自动完成编译,测试,打包,部署等等一系列任务,大大提高开发效率. Ant和make命令很像. ...

  3. Eclipse 自动生成 Ant的Build.xml 配置文件

    Eclipse 自动生成 Ant的Build.xml 配置文件,生成的方法很隐蔽 选择你要生成Build.xml文件的项目,右键. Export-> General -> Ant Buil ...

  4. 使用.bat文件运行ant的build.xml

    1.新建一个txt文件 2.复制下面命令到txt文件 echo "Start build..." call ant.bat -f "E:\build.xml" ...

  5. spring 以Ant Build方式运行build.xml文件,报warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds 的解决办法

    Buildfile: F:\experience\spring_pdf\sourcecode\example1\build.xml compile: [javac] F:\experience\spr ...

  6. ANT编译build.xml

    一,体验ant就像每个语言都有HelloWorld一样,一个最简单的应用能让人感受一下Ant1,首先你要知道你要干什么,我现在想做的事情是:编写一些程序编译它们把它打包成jar包把他们放在应该放置的地 ...

  7. 【转】Ant之build.xml详解

    关键字: ant build.xml Ant的概念 可能有些读者并不连接什么是Ant以及入可使用它,但只要使用通过Linux系统得读者,应该知道make这个命令.当编译Linux内核及一些软件的源程序 ...

  8. Ant:build.xml 结构

     Ant build.xml 结构 project target task data property datatype v\:* {behavior:url(#default#VML);} o\:* ...

  9. java应用测试报告生成(二):利用ant的build.xml生成测试报告

    1.将写好的项目导出 在工程下会生成一个build.xml的蚂蚁图标的文件. 2.右击该文件,选择run as Ant build 其中的测试目录是可以选择的,如果涉及到顺序也可以调整顺序 3.执行后 ...

随机推荐

  1. 2018.07.25 bzoj2125: 最短路(圆方树+倍增)

    传送门 人生的第一道仙人掌. 这道题求是仙人掌上的最短路. 先建出圆方树,然后用倍增跑最短路,当lca" role="presentation" style=" ...

  2. Django入门与实践-第16章:用户登录(完结)

    # myproject/settings.py LOGIN_REDIRECT_URL = 'home' EMAIL_BACKEND = 'django.core.mail.backends.conso ...

  3. spring boot入门与进阶

    视频课程包含: SpringBoot入门.SpringBoot进阶.Spring Cloud微服务.Spring Ecosystem 微服务相关.Spring Boot 入门 IDEA 版本.Spri ...

  4. hibernate createQuery和createSQLQuery 查询结果count计算

    createQuery 针对hql语句查询 Query query=getSession().createQuery(hql);int result =((Number) query.iterate( ...

  5. BZOJ 1007 [HNOI2008]水平可见直线 (栈)

    1007: [HNOI2008]水平可见直线 Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 7940  Solved: 3030[Submit][Sta ...

  6. python 求第k个最大数

    #coding = utf-8 import sys def Cal_NO(a,b): nums=sorted(a,reverse=True) result=nums[b-1] return resu ...

  7. (匹配)Oil Skimming -- hdu --4185

    链接: http://acm.hdu.edu.cn/showproblem.php?pid=4185 http://acm.hust.edu.cn/vjudge/contest/view.action ...

  8. 3D UI场景中,把XY平面的尺寸映射为屏幕像素的数学模型推导

    概述及目录(版权所有,请勿转载,欢迎读者提出错误) 之前用kanzi的3D UI引擎和cocos-2d的时候都有遇到过这个问题,就如何把3D场景中的XY平面的尺寸映射为与屏幕像素一一对应的,即XY平面 ...

  9. 几个经典的数学库之一学习---VCGlib(3)

    Camera and shot abstraction for managing views 视图的定义,以及mesh的操作说明. Shot(镜头) and camera(相机) shot摄像结构以及 ...

  10. Bug中的中的小问题编程需要注意

    Bug中的中的小问题编程需要注意 1. 关于局部变量与全局变量是否同名问题 如果参数传递的是一个数组,且全局变量与参数数据同名,则局部变量作用域中,这两个同名的数据可能会引起冲突. 如下:如果一开始是 ...