Hi, I am seeing some unexpected behaviour with ant's fail task.
I have created various sub-project build.xmls for various components of our overall product and then there is a master ant build.xml which calls these sub-project builds. The sub-project build.xmls have a target to check if a build is successful or not as shown below : <! - dcb_component_build.xml -> .... .... <target name="check_dcb_build" depends="build_all" description="make the build fail, for any non-zero return code"> <condition property="dcb_build_passed"> <and> <equals arg1='${dcb_opt_retcode}' arg2='0'/> <equals arg1='${dcb_debug_retcode}' arg2='0'/> <equals arg1='${dcb_opt_errcheck}' arg2='0'/> <equals arg1='${dcb_debug_errcheck}' arg2='0'/> </and> </condition> <fail unless="dcb_build_passed" message="dcb build failed."/> </target> Now this target generates a false build failure everytime the sub-project build is called from the top level master ant build.xml with the following error log : <stacktrace><![CDATA[file:T:/dc/src/dcb/build.xml:42: dcb build failed. at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:104) at org.apache.tools.ant.Task.perform(Task.java:319) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371) at org.apache.tools.ant.Task.perform(Task.java:319) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235) </stacktrace> The master build.xml from a different folder calls the dcb component with simple ant call as followed : <target name="dcb" description="Build the dcb stack here."> <echo> ***************************************</echo> <echo> Building dcb for Version="${version}" </echo> <echo> ***************************************</echo> <ant dir="${dcb.dir}" target="${build.target}" output="${dcbbuild.output}"/> <echo> ***************************************</echo> <echo> Finished dcb build.</echo> <echo> ***************************************</echo> </target> The false failure happens only when the dcb build target is invoked from the master build.xml, everything works fine and as expected when the same relevant target is called directly from the dcb_component_build.xml . I did try everything like inheritAll and so on from the ant manual - but no help. Has anyone see something similar or aware of any limitation that the fail task might have. Thank you. Sunil-- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]