Hello All,

I'm a new member of the list and as such I may be presenting a solution to an old problem - please forgive me if so. However, after a lot of searching I could not find a solution to my problem and such thought it might be interesting to publish my solution.

The problem arose with respect to forking a Maven process from an Ant build script running under CruiseControl on a Win32 platform with Maven-1.0.2 installed. I could not get my overall build to fail. Ordinarilly this would be a good problem :-). The issue was that individual projects were failing but the overall build status was reporting a success. I discovered that this was because no errorlevel codes were being returned from the maven batch file that was shipped with the 1.0.2 distribution.

The solution is to edit the maven.bat file and include the following line at the very end of the batch file.

exit errorlevel

This causes an explicit return of the exit reason for the process and will report back correctly to the forking process (i.e. Ant). Otherwise the default exit code for all windows batch files is 0 and this does not report any errors with the build. So strangely enough now that my builds are failing, I'm happy. ;-) Just thought that I'd share this solution in case anyone else has the same problem.

Best Regards,

Jonathan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to