0
BUILD FAILED
C:\Users\SomeUser\Downloads\mule_test\build.xml:69: Problem: failed to create task or type cloudHubDeploy
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

命令:

<target name="deploy" depends="package">
    <cloudHubDeploy username="usr" password="pswd" domain="${app.name}" applicationFile="${app.file}" />
</target>

使用ant-contrib-1.0b3.jar但仍然 ant 无法识别该命令。

4

2 回答 2

1

<cloudHubDeploy> is a third-party task. You'll need to include the source that defines it or reference its JAR.

A quick Google search yielded this guide and this download link.

于 2013-05-07T15:05:18.133 回答
0

正如@whiskeyspider 所说,这是第 3 方 ANT 任务,这始终意味着您缺少 ANT 类路径中的 jar。

自述文件解释了启用任务所需的内容:

Ant 是一个用于构建 Java 应用程序的工具,可以通过添加自定义任务进行扩展。这些任务将让您构建和部署 Mule 应用程序。

要使用这些任务:

Add -lib mule-anttasks.jar to your Ant command line, to put the classes that implement the tasks in Ant's classpath.
Add <taskdef resource="org/mule/mulePackagingTasks.properties"/> to your Ant build file, to import the task definitions.

mule-anttasks.jar 也可以添加到以下目录之一,以便 ANT 在运行时获取它:

  • $ANT_HOME/lib
  • $HOME/.ant/lib

希望这可以帮助。

于 2013-05-07T19:19:22.613 回答