ant 中使用scp 时 ,出现 jsch.jar包 加载出现问题?
bulid.xml 中定义 自己 ant 标签 出现一下错误:
写道
libin@libin-ThinkPad-T420:~/workspace/yoyo/datacell-refactor$ ant initMyTask
Buildfile: /home/libin/workspace/yoyo/datacell-refactor/build.xml
initMyTask:
BUILD FAILED
/home/libin/workspace/yoyo/datacell-refactor/build.xml:130: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.ssh.Scp cannot be found: com/jcraft/jsch/Logger
using the classloader AntClassLoader[/home/libin/workspace/yoyo/datacell-refactor/lib/jsch-0.1.50.jar]
Total time: 1 second
libin@libin-ThinkPad-T420:~/workspace/yoyo/datacell-refactor$ ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013
libin@libin-ThinkPad-T420:~/workspace/yoyo/datacell-refactor$
Buildfile: /home/libin/workspace/yoyo/datacell-refactor/build.xml
initMyTask:
BUILD FAILED
/home/libin/workspace/yoyo/datacell-refactor/build.xml:130: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.ssh.Scp cannot be found: com/jcraft/jsch/Logger
using the classloader AntClassLoader[/home/libin/workspace/yoyo/datacell-refactor/lib/jsch-0.1.50.jar]
Total time: 1 second
libin@libin-ThinkPad-T420:~/workspace/yoyo/datacell-refactor$ ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013
libin@libin-ThinkPad-T420:~/workspace/yoyo/datacell-refactor$
buils.xml 中 的 脚本:
写道
<path id="jsch.path">
<fileset dir="${basedir}/lib" includes="*jsch*.jar" />
</path>
<target name="initMyTask">
<taskdef name="myscp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp" classpathref="jsch.path">
</taskdef>
</target>
<fileset dir="${basedir}/lib" includes="*jsch*.jar" />
</path>
<target name="initMyTask">
<taskdef name="myscp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp" classpathref="jsch.path">
</taskdef>
</target>
如果使用 :
写道
ant initMyTask -lib /home/libin/workspace/yoyo/datacell-refactor/lib/jsch-0.1.50.jar
执行 是正确的?
有朋友 遇到这个问题吗? 在使用scp命令的时候,,出见加载 jar包 貌似不起作用的现象
相关推荐
ant运行scp以及sshexec任务所必须的jar包,这是optional的,所以ant默认不会有的,需要自己加上
NULL 博文链接:https://liudaoru.iteye.com/blog/265705
最新jsch.jar,通过该包可实现ant控制linux操作,如启动服务器、scp命令等
可以实现ant下使用ssh或者scp,具体的实现可以参见实例。
java调SCP java调SCP.rarjava调SCP.rar
Linux—— scp 命令使用方法.doc
Java运用ganymed-ssh2-build210.jar包远程连接操作linux服务器 (SCP和SFTP的运用)
scp安保许可等级.pdf
不需要远程传输文件Linux如何关闭scp和sftp命令.docx
NULL 博文链接:https://lilinhui.iteye.com/blog/1150559
中国乳制品行业SCP范式分析课件.pptx
产业组织SCP分析范式概述.pptx
第三章产业组织SCP分析框架1.pptx
我国连锁超市行业的SCP模式分析报告.doc
下载 DICOM DVTK Storage SCP Emulator 3.3.0.0.msi
包含jsch最新的jar文件,以及sshxcute的jar和源码。 可用于实现ssh、scp、sftp功能。
SCP将文件上传至服务器,或下载服务器文件, 的引用文件,测试可用
资源分类:Python库 所属语言:Python 资源全名:scp-0.13.2.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059