Maven Ant SCP 错误 [英] Maven Ant SCP error

查看:35
本文介绍了Maven Ant SCP 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 ant-command 运行maven-antrun-plugin"(maven 3.0.3)时:

when I run a "maven-antrun-plugin" (maven 3.0.3) with the ant-command:

 <scp />

我得到:问题:无法创建任务或键入 scp[ERROR] 原因:找不到类 org.apache.tools.ant.taskdefs.optional.ssh.Scp.

I get: Problem: failed to create task or type scp [ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.

我检查了我的 $ANT_HOME/lib,jar 在那里 (ant-jsch.jar).

I checked in my $ANT_HOME/lib and the jar is there (ant-jsch.jar).

有什么问题吗?

顺便说一句,我使用的是 ubuntu 11.10.Ant 是从网站下载的(从 ubuntu 的仓库我也遇到了同样的问题)

BTW I'm using ubuntu 11.10. Ant is downloaded from the website (as from the ubuntu's repository I got the same problem)

推荐答案

你是不是忘记设置任务定义了

Did you forget to set the task definition

<taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp" classpathref="lib/ant-jsch.jar" />

这篇关于Maven Ant SCP 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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