Invoker always returns 0 on Windows due to cmd.exe and exit /b in mvn.bat
-------------------------------------------------------------------------

                 Key: MINVOKER-3
                 URL: http://jira.codehaus.org/browse/MINVOKER-3
             Project: Maven 2.x Invoker Plugin
          Issue Type: Bug
         Environment: Windows XP
            Reporter: Barrie Treloar
            Assignee: John Casey
            Priority: Blocker
         Attachments: MVINOKER-3-patch.txt

The mvn.bat file uses "exit /b %ERROR_CODE%" and as described in the mailing 
list discussion 
http://www.nabble.com/maven-invoker-plexus-utils%3A-Problems-with-Windows-and-%22cmd.exe%22-always-returning-0-exit-code.-tf3699374s177.html#a10347292
 will cause cmd.exe to always return 0 (indicating success) instead of 
propagating the result code of the invoked command.

Patch and unit tests included.

Summary:

Added "MAVEN_TERMINATE_CMD" set to "on" as environment variable for 
MavenCommandLineBuilder.  While this is a Windows specific fix, it should not 
impact other environments.

Upgraded CommandLine to use createArg instead of deprecated createArguments,  
in the process fixing all "FIXME"s.


To fix PLXUTILS-31 require upgrade of plexus-utils
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <version>1.4.2-SNAPSHOT</version>

-- 
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

        

Reply via email to