Thanks Vijay, This works fine. -----Original Message----- From: Vijay Aravamudhan [mailto:[EMAIL PROTECTED] Sent: Saturday, September 01, 2007 12:27 PM To: Ant Users List Subject: Re: Updated : Failonerror does not have any effect on compilation failure
it would be better to call it using the <ant/> task. That way the build will fail if any step or target fails. Exec creates a different process and so cannot cause the current build to fail. hth, Vijay Ravi Roy wrote: > Hi All, > > I am calling ant.bat using in the following way : > > <property name=debug" value="false" /> > > <target name="project.compile"> > <exec taskname="compile" dir="${project.dir}" executable="cmd.exe"> > <arg line="/c ant.bat" /> > <arg line="-file projectbuild.xml -Dfailonerrror=true > -Ddebug=${debug}" /> > </exec> > > </target> > > I am using javac task inside projecbuild.xml and calling each project > 's projectbuild.xml using <exec> task as shown above in the target. > The problem is even compilation of the porject is failed, it continue > to execute next target, I am not sure what is wrong. I think in > principle it should not go further and halt the build immediately. > > Could somebody point the troubleslopt? Or Am I missing something ? > Thanks for the pointers! > > Regards, > Ravi > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]