You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2005/12/20 07:22:39 UTC
[jira] Moved: (MRELEASE-18) mvn.bat does not properly return the
exit code of the java process
[ http://jira.codehaus.org/browse/MRELEASE-18?page=all ]
Jason van Zyl moved MNG-1632 to MRELEASE-18:
--------------------------------------------
Component: (was: maven-release-plugin)
(was: Plugins and Lifecycle)
Workflow: jira (was: Maven)
Key: MRELEASE-18 (was: MNG-1632)
Project: Maven 2.x Release Plugin (was: Maven 2)
> mvn.bat does not properly return the exit code of the java process
> ------------------------------------------------------------------
>
> Key: MRELEASE-18
> URL: http://jira.codehaus.org/browse/MRELEASE-18
> Project: Maven 2.x Release Plugin
> Type: Bug
> Reporter: David Hawkins
> Attachments: MNG-1632-maven-core-2.patch, MNG-1632-maven-core.patch
>
>
> This manifests itself when running release:perform and an error occurs in the child process. The stdout shows a build error for the child process, but a shows build success for the outer process. This is pretty confusing if you only happen to look at the last message.
> This patch also makes mvn.bat return the error code properly to when running within cygwin.
> Detailed explanation: The problem is that running mvn.bat within cygwin, you are actually running cmd.exe which then executes mvn.bat. The exit code returned to the calling application is actually the exit code from the execution of cmd.exe, not the .bat script executed within it. In order to get the exit code all the way out to the calling application, you have to omit the /b when calling exit. ("exit 0" vs. "exit /b 0"). When calling exit without the /b, the cmd prompt window (if any) will actually exit, so mvn.bat makes sure it is a batch script whose execution originated in a cygwin shell. If it originated in cygwin, it uses "exit" else it uses "exit /b".
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org