Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions apache-maven/src/bin/mvn.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,11 @@ echo NB: JAVA_HOME should point to a JDK not a JRE >&2
goto error

:chkMHome
set "MAVEN_HOME=%~dp0.."
if not "%MAVEN_HOME%"=="" goto stripMHome
set "MAVEN_HOME=%~dp0"
set "MAVEN_HOME=%MAVEN_HOME:~0,-5%"
Comment thread
rostidev marked this conversation as resolved.
if not "%MAVEN_HOME%"=="" goto checkMCmd
goto error

:stripMHome
if not "_%MAVEN_HOME:~-1%"=="_\" goto checkMCmd
set "MAVEN_HOME=%MAVEN_HOME:~0,-1%"
goto stripMHome

:checkMCmd
if exist "%MAVEN_HOME%\bin\mvn.cmd" goto init
goto error
Expand Down