1
+ @ REM ----------------------------------------------------------------------------
2
+ @ REM Licensed to the Apache Software Foundation (ASF) under one
3
+ @ REM or more contributor license agreements. See the NOTICE file
4
+ @ REM distributed with this work for additional information
5
+ @ REM regarding copyright ownership. The ASF licenses this file
6
+ @ REM to you under the Apache License, Version 2.0 (the
7
+ @ REM "License"); you may not use this file except in compliance
8
+ @ REM with the License. You may obtain a copy of the License at
1
9
@ REM
2
- @ REM The MIT License
3
- @ REM Copyright © 2014-2021 Ilkka Seppälä
4
- @ REM
5
- @ REM Permission is hereby granted, free of charge, to any person obtaining a copy
6
- @ REM of this software and associated documentation files (the "Software"), to deal
7
- @ REM in the Software without restriction, including without limitation the rights
8
- @ REM to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- @ REM copies of the Software, and to permit persons to whom the Software is
10
- @ REM furnished to do so, subject to the following conditions:
11
- @ REM
12
- @ REM The above copyright notice and this permission notice shall be included in
13
- @ REM all copies or substantial portions of the Software.
14
- @ REM
15
- @ REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- @ REM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- @ REM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- @ REM AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- @ REM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- @ REM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- @ REM THE SOFTWARE.
10
+ @ REM http://www.apache.org/licenses/LICENSE-2.0
22
11
@ REM
12
+ @ REM Unless required by applicable law or agreed to in writing,
13
+ @ REM software distributed under the License is distributed on an
14
+ @ REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ @ REM KIND, either express or implied. See the License for the
16
+ @ REM specific language governing permissions and limitations
17
+ @ REM under the License.
18
+ @ REM ----------------------------------------------------------------------------
23
19
24
20
@ REM ----------------------------------------------------------------------------
25
21
@ REM Maven Start Up Batch script
@@ -50,8 +46,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
50
46
@ REM Execute a user defined script before this one
51
47
if not " %MAVEN_SKIP_RC% " == " " goto skipRcPre
52
48
@ REM check for pre script, once with legacy .bat ending and once with .cmd ending
53
- if exist " %HOME % \mavenrc_pre.bat" call " %HOME % \mavenrc_pre.bat"
54
- if exist " %HOME % \mavenrc_pre.cmd" call " %HOME % \mavenrc_pre.cmd"
49
+ if exist " %USERPROFILE % \mavenrc_pre.bat" call " %USERPROFILE % \mavenrc_pre.bat" %*
50
+ if exist " %USERPROFILE % \mavenrc_pre.cmd" call " %USERPROFILE % \mavenrc_pre.cmd" %*
55
51
:skipRcPre
56
52
57
53
@ setlocal
@@ -124,9 +120,9 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
124
120
set WRAPPER_JAR = " %MAVEN_PROJECTBASEDIR% \.mvn\wrapper\maven-wrapper.jar"
125
121
set WRAPPER_LAUNCHER = org.apache.maven.wrapper.MavenWrapperMain
126
122
127
- set DOWNLOAD_URL = " https://repo.maven.apache.org/maven2/io/takari /maven-wrapper/0.5.6 /maven-wrapper-0.5.6 .jar"
123
+ set DOWNLOAD_URL = " https://repo.maven.apache.org/maven2/org/apache /maven/wrapper/maven -wrapper/3.1.0 /maven-wrapper-3.1.0 .jar"
128
124
129
- FOR /F " tokens=1,2 delims==" %%A IN (" %MAVEN_PROJECTBASEDIR% \.mvn\wrapper\maven-wrapper.properties" ) DO (
125
+ FOR /F " usebackq tokens=1,2 delims==" %%A IN (" %MAVEN_PROJECTBASEDIR% \.mvn\wrapper\maven-wrapper.properties" ) DO (
130
126
IF " %%A " == " wrapperUrl" SET DOWNLOAD_URL = %%B
131
127
)
132
128
@@ -138,7 +134,7 @@ if exist %WRAPPER_JAR% (
138
134
)
139
135
) else (
140
136
if not " %MVNW_REPOURL% " == " " (
141
- SET DOWNLOAD_URL = " %MVNW_REPOURL% /io/takari /maven-wrapper/0.5.6 /maven-wrapper-0.5.6 .jar"
137
+ SET DOWNLOAD_URL = " %MVNW_REPOURL% /org/apache /maven/wrapper/maven -wrapper/3.1.0 /maven-wrapper-3.1.0 .jar"
142
138
)
143
139
if " %MVNW_VERBOSE% " == " true" (
144
140
echo Couldn't find %WRAPPER_JAR% , downloading it ...
@@ -162,7 +158,13 @@ if exist %WRAPPER_JAR% (
162
158
@ REM work with both Windows and non-Windows executions.
163
159
set MAVEN_CMD_LINE_ARGS = %*
164
160
165
- %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% " -Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR% " %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
161
+ %MAVEN_JAVA_EXE% ^
162
+ %JVM_CONFIG_MAVEN_PROPS% ^
163
+ %MAVEN_OPTS% ^
164
+ %MAVEN_DEBUG_OPTS% ^
165
+ -classpath %WRAPPER_JAR% ^
166
+ " -Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR% " ^
167
+ %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
166
168
if ERRORLEVEL 1 goto error
167
169
goto end
168
170
@@ -172,15 +174,15 @@ set ERROR_CODE=1
172
174
:end
173
175
@ endlocal & set ERROR_CODE = %ERROR_CODE%
174
176
175
- if not " %MAVEN_SKIP_RC% " == " " goto skipRcPost
177
+ if not " %MAVEN_SKIP_RC% " == " " goto skipRcPost
176
178
@ REM check for post script, once with legacy .bat ending and once with .cmd ending
177
- if exist " %HOME % \mavenrc_post.bat" call " %HOME % \mavenrc_post.bat"
178
- if exist " %HOME % \mavenrc_post.cmd" call " %HOME % \mavenrc_post.cmd"
179
+ if exist " %USERPROFILE % \mavenrc_post.bat" call " %USERPROFILE % \mavenrc_post.bat"
180
+ if exist " %USERPROFILE % \mavenrc_post.cmd" call " %USERPROFILE % \mavenrc_post.cmd"
179
181
:skipRcPost
180
182
181
183
@ REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
182
- if " %MAVEN_BATCH_PAUSE% " == " on" pause
184
+ if " %MAVEN_BATCH_PAUSE% " == " on" pause
183
185
184
- if " %MAVEN_TERMINATE_CMD% " == " on" exit %ERROR_CODE%
186
+ if " %MAVEN_TERMINATE_CMD% " == " on" exit %ERROR_CODE%
185
187
186
- exit /B %ERROR_CODE%
188
+ cmd /C exit /B %ERROR_CODE%
0 commit comments