[ http://jira.codehaus.org/browse/MNG-1632?page=all ]
David Hawkins updated MNG-1632:
-------------------------------
Attachment: MNG-1632-maven-core-2.patch
Sorry for taking so long to respond on this.
I have created a new patch, "MNG-1632-maven-core-2.patch", which handles the
MAVEN_TERMINATE_CMD environment variable. If the variable is set to anything
other than "", mvn.bat will terminate cmd rather than exit /b. I've verified
this works correctly by calling it with a test java application and calling it
within cygwin. I have not tested it with continuum.
--David
> mvn.bat does not properly return the exit code of the java process
> ------------------------------------------------------------------
>
> Key: MNG-1632
> URL: http://jira.codehaus.org/browse/MNG-1632
> Project: Maven 2
> Type: Bug
> Components: maven-release-plugin, Plugins and Lifecycle
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]