Ant scp 任务不起作用,即使在 ant/lib 上使用 jsch [英] Ant scp task not working, even with jsch on ant/lib

查看:36
本文介绍了Ant scp 任务不起作用,即使在 ant/lib 上使用 jsch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过 scp 复制一个 war 文件.

I need to copy a war file via scp.

我已将 jsch-0.1.42.jar 添加到 $ANT_HOME/lib 但我仍然收到此错误:

I have added the jsch-0.1.42.jar to $ANT_HOME/lib but I'm still getting this error:

原因:类org.apache.tools.ant.taskdefs.optional.ssh.Scp没有找到.这看起来像是 Ant 的可选组件之一.

Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found. This looks like one of Ant's optional components.

这是运行 ant -diagnostics 的结果,以防万一:

This is the result of running ant -diagnostics just in case:

http://gist.github.com/320859

推荐答案

这看起来像是您的问题,从诊断的顶部来看:

This looks like your problem, from the top of the diagnostics:

可选任务:不可用

您的 $ANT_HOME/lib 目录缺少 ant-jsch.jar,这是您缺少的类的来源.

Your $ANT_HOME/lib directory is missing ant-jsch.jar, which is where your missing class comes from.

我不确定这是怎么发生的 - 我总是从 下载站点上的 ZIP 文件安装 Ant/a>,其中包括所有可选任务.如果您从 Linux 包安装 Ant,请尝试检查是否有用于可选任务的单独包.

I'm not sure how this happened - I always install Ant from the ZIP file on the download site, which includes all the optional tasks. If you installed Ant from a Linux package, try checking to see if there is a separate package for the optional tasks.

一旦你安装了可选任务,我会按照@trashgod 的建议删除旧版本的 jsch.jar.

Once you get the optional tasks installed, I would delete the old version of jsch.jar as @trashgod suggests.

这篇关于Ant scp 任务不起作用,即使在 ant/lib 上使用 jsch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆