Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
Windows 2000 SP4 / Maven 2.0
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