【发布时间】:2015-01-16 17:31:49
【问题描述】:
您好,下面是我从命令提示符运行代码时的代码,因为 ant run iam 得到错误为
ERROR:
F:\xxx\build.xml:29: Problem: failed to create task or type target
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="checkout" description="checkout the code from Perforce">
<exec executable="cmd">
<arg value="/c"/>
<arg value="p4 -u -p sync"/>
<arg value="-p"/>
</exec>
</target>
<target name="getlatestcode" description="checkout and get latest code from perforce">
<exec executable="cmd">
<arg value="/c"/>
<arg value="p4"/>
<arg value="-p"/>
</exec>
</target>
<target name="cordovabuild" description="Getting the code and build the project">
<exec executable="cmd">
<arg value="/c"/>
<arg value="p4"/>
<arg value="-p"/>
</exec>
</target>
<target name="run">
<target name="checkout"/>
<target name="getlatestcode" depends="checkout"/>
<target name="cordovabuild" depends="getlatestcode"/>
<target name="run" depends="cordovabuild,getlatestcode,checkout"/>
</target>
【问题讨论】:
标签: xml ant build compiler-errors build.xml