我使用 MobileFirst 6.3 并在 Windows 7 中编写了以下 ant Build.xml 我安装了最新的 CLI。
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="adapter">
<taskdef resource="com/worklight/ant/defaults.properties">
<classpath>
<pathelement location="C:\Tools\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib\worklight-ant-deployer.jar"/>
</classpath>
</taskdef>
<target name="adapter">
<adapter-builder
folder="C:\pruebas\adapters\adapter"
destinationfolder="C:\pruebas\bin"/>
</target>
</project>
当我使用以下命令“ant adapter”执行任务时,它给了我以下错误:
C:\pruebas\ANT>ant adapter
Buildfile: C:\pruebas\ANT\build.xml
adapter:
BUILD FAILED
C:\pruebas\ANT\build.xml:11: Problem: failed to create task or type adapter-buil
der
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.
Total time: 0 seconds
有什么帮助吗?