I call ant.bat from CruiseControl.NET but I have the same problem The ant.bat script doesn't respect error codes properly. I edit mine and put the following line at the end:
exit %ERRORLEVEL% The only problem with this is that if you run it from a normal command prompt it exits the command prompt window, so I actually copy ant.bat to another file ('and-and-exit.bat'), edit that one and then point CCNet (nant in your case) to that. HTH, Mike On 28/11/06, Moshe Hajaj <[EMAIL PROTECTED]> wrote: > > > > > I'm trying to combine a java build inside my existing NAnt/.NET nuild > script. > > The problem is that executing Ant this way: > > > > <exec > > program="${sys.env.ANT_HOME}\bin\ant.bat" > > workingdir="${current.dir}" > > commandline="-buildfile ibm_java.xml compile" > > failonerror="true" > > /> > > > > is not causing the build to fail. > > > > > > Wrapping it with: > > > > <trycatch> > > <try> > > …. > > </try> > > <catch property="failure"> > > <echo message="Java build failed!"/> > > <fail message="${failure}" /> > > </catch> > > </trycatch> > > > > doesn't work either. > > > > Is there's any way I can have Ant report on error? I checked my XML log file > (through xml listener) and it captures the errors as warnings! > > Any idea, someone? > > > > Thanks, > > `M > > > ________________________________ > Access over 1 million songs - Yahoo! Music Unlimited. > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > NAnt-users mailing list > NAnt-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users > > > -- mike roberts | http://www.mikebroberts.com/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users