[ http://jira.codehaus.org/browse/MNG-1318?page=all ]
Brett Porter updated MNG-1318: ------------------------------ Description: When running Maven 2 by calling mvn.bat on Windows 2000 (SP4) the batch file sets M2_HOME to a value including the name of the batch file itself. This results in an error: ERROR: M2_HOME is set to an invalid directory. M2_HOME = C:\maven\maven-2.0\bin\mvn.bat\.. Please set the M2_HOME variable in your environment to match the location of the Maven installation When changing line 72 of mvn.bat to use %~dp0 instead of %~dps0 it works correctly: if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0\.. Looking at the SVN history, this was changed to %~dps0 to work with spaces http://svn.apache.org/viewcvs.cgi?rev=163778&view=rev was: When running Maven 2 by calling mvn.bat on Windows 2000 (SP4) the batch file sets M2_HOME to a value including the name of the batch file itself. This results in an error: ERROR: M2_HOME is set to an invalid directory. M2_HOME = C:\maven\maven-2.0\bin\mvn.bat\.. Please set the M2_HOME variable in your environment to match the location of the Maven installation When changing line 72 of mvn.bat to use %~dp0 instead of %~dps0 it works correctly: if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0\.. Looking at the SVN history, this was changed to %~dps0 to work with spaces http://svn.apache.org/viewcvs.cgi?rev=163778&view=rev Fix Version: 2.0.1 > mvn.bat sets incorrect value to M2_HOME [Windows 2000] > ------------------------------------------------------ > > Key: MNG-1318 > URL: http://jira.codehaus.org/browse/MNG-1318 > Project: Maven 2 > Type: Bug > Components: maven-core > Versions: 2.0 > Environment: Windows 2000 SP4 / Maven 2.0 > Reporter: ajbanck > Fix For: 2.0.1 > > > When running Maven 2 by calling mvn.bat on Windows 2000 (SP4) the batch file > sets M2_HOME to a value including the name of the batch file itself. > This results in an error: > ERROR: M2_HOME is set to an invalid directory. > M2_HOME = C:\maven\maven-2.0\bin\mvn.bat\.. > Please set the M2_HOME variable in your environment to match the location of > the Maven installation > When changing line 72 of mvn.bat to use %~dp0 instead of %~dps0 it works > correctly: > if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0\.. > Looking at the SVN history, this was changed to %~dps0 to work with spaces > http://svn.apache.org/viewcvs.cgi?rev=163778&view=rev -- 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]