【发布时间】:2011-04-25 12:38:36
【问题描述】:
我正在尝试使用 Ant 任务上传文件。如果我直接使用 Ant 文件会被上传,但如果我通过 Maven 调用 ant 任务(使用 maven-antrun-plugin)我会收到以下错误:
An Ant BuildException has occurred: The following error occurred while execution this line:
/home/me/proj/build.xml:15: Problem: failed to create task or type ftp
Cause: the class org.apache.tools.ant.taskdefs.optional.net.FTP was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-ANT_HOME/lib
ant-commonsnet.jar 显然对 Ant 可用:
$ ls $ANT_HOME/lib | grep ant-commons-net
ant-commons-net.jar
是否为 maven-antrun-plugin 单独定义了 Ant 类路径,还是我遗漏了什么?
【问题讨论】:
标签: ant maven-2 ftp apache-commons-net