Error while running ant build.xml -
hi below code when iam running code command prompt ant run iam getting error
error: f:\xxx\build.xml:29: problem: failed create task or type target cause: name undefined. action: check spelling. action: check custom tasks/types have been declared. action: check <presetdef>/<macrodef> declarations have taken place.
this code:
<target name="checkout" description="checkout code perforce"> <exec executable="cmd"> <arg value="/c"/> <arg value="p4 -u -p sync"/> <arg value="-p"/> </exec> </target> <target name="getlatestcode" description="checkout , latest code perforce"> <exec executable="cmd"> <arg value="/c"/> <arg value="p4"/> <arg value="-p"/> </exec> </target> <target name="cordovabuild" description="getting code , build 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>
you have target within target not liked ant below.
<target name="run"> <target name="checkout"/> <target name="getlatestcode" depends="checkout"/> <target name="cordovabuild" depends="getlatestcode"/> <target name="run" depends="cordovabuild,getlatestcode,checkout"/> </target>
you should have 1 independent target , have dependencies in depends run (one within run) in above. remove outper run target , corresponding ending tag should like:
<target name="checkout"/> <target name="getlatestcode" depends="checkout"/> <target name="cordovabuild" depends="getlatestcode"/> <target name="run" depends="cordovabuild,getlatestcode,checkout"/>
and run run target, issue ant run
(build file name optional, assuming per error have these within build.xml)
Comments
Post a Comment