The following comment has been added to this issue:

     Author: Ronald Blaschke
    Created: Thu, 5 Feb 2004 9:00 AM
       Body:
I have played around with this a bit on WinXP, and it seems like "exit /b %exit_code%" 
just sets the ERRORLEVEL and finishes the current batch script, whereas "exit 
%exit_code%" terminates cmd.exe with the errorlevel.

"exit /b %ERRORLEVEL%" at the end of the batch file propably does nothing, as it seems 
to be intended to exit the batch somewhere in the middle.

"exit %ERRORLEVEL%" at the end unfortunately terminates the *process* with the exit 
code (which is what you want when treating a batch file as a process, but not when you 
invoke it on the command line).
---------------------------------------------------------------------
View this comment:
  
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1124&page=comments#action_16473

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1124

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1124
    Summary: Add exit to maven.bat
       Type: Improvement

     Status: Open
   Priority: Trivial

 Original Estimate: 1 minute
 Time Spent: Unknown
  Remaining: 1 minute

    Project: maven
 Components: 
             core

   Assignee: dion gillard
   Reporter: Ronald Blaschke

    Created: Thu, 22 Jan 2004 5:59 AM
    Updated: Thu, 5 Feb 2004 9:00 AM
Environment: Windows (XP)

Description:
Windows (XP) seems to not propagate the last ERRORLEVEL in batch files.  Thus, when 
calling maven.bat from an ant build file, ant reports success, even when maven fails.

...
1 error
2 warnings
BUILD FAILED

Total time: 6 seconds
Finished at: Thu Jan 22 11:49:10 CET 2004

File...... file:/C:/Documents and Settings/user/.maven/plugins/maven-test-plugin-1
.4/
Element... javac
Line...... 34
Column.... 46
Compile failed; see the compiler error output for details.



BUILD SUCCESSFUL
Total time: 8 seconds


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to