mirror of https://github.com/apache/maven.git
work without M2_HOME - base on location of batch file
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163157 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d24fa87cb6
commit
6e812f1d2e
|
@ -20,9 +20,9 @@
|
|||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
|
@ -67,6 +67,9 @@ goto end
|
|||
:chkMHome
|
||||
if not "%M2_HOME%"=="" goto valMHome
|
||||
|
||||
if "%OS%"=="Windows_NT" SET M2_HOME=%~dp0\..
|
||||
if not "%M2_HOME%"=="" goto valMHome
|
||||
|
||||
echo.
|
||||
echo ERROR: M2_HOME not found in your environment.
|
||||
echo Please set the M2_HOME variable in your environment to match the
|
||||
|
|
Loading…
Reference in New Issue