Stop ant build if makefile does not work

I have an ant build file that runs makefile

<target name="jni"> <exec executable="make"> <arg line="-f jni/Makefile"/> </exec> </target> 

however, if make does not work, other rules that depend on this rule will be executed

how can i stop ant if jni rule fails?

+4
source share
1 answer

use the failonerror attribute, which is false by default:

 <target name="jni"> <exec executable="make" failonerror="true"> <arg line="-f jni/Makefile"/> </exec> </target> 

I never cease to wonder why this is not so by default ... See the docs .

+7
source

Source: https://habr.com/ru/post/1445628/


All Articles