62 lines
3.0 KiB
Batchfile
62 lines
3.0 KiB
Batchfile
@REM ----------------------------------------------------------------------------
|
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
|
@REM or more contributor license agreements. See the NOTICE file
|
|
@REM distributed with this work for additional information
|
|
@REM regarding copyright ownership. The ASF licenses this file
|
|
@REM to you under the Apache License, Version 2.0 (the
|
|
@REM "License"); you may not use this file except in compliance
|
|
@REM with the License. You may obtain a copy of the License at
|
|
@REM
|
|
@REM http://www.apache.org/licenses/LICENSE-2.0
|
|
@REM
|
|
@REM Unless required by applicable law or agreed to in writing,
|
|
@REM software distributed under the License is distributed on an
|
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
@REM KIND, either express or implied. See the License for the
|
|
@REM specific language governing permissions and limitations
|
|
@REM under the License.
|
|
@REM ----------------------------------------------------------------------------
|
|
|
|
@REM ----------------------------------------------------------------------------
|
|
@REM Apache Maven Wrapper startup batch script, version 3.2.0
|
|
@REM ----------------------------------------------------------------------------
|
|
|
|
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
|
@SET __MVNW_CMD__=
|
|
@SET __MVNW_ERROR__=
|
|
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
|
@SET PSModulePath=
|
|
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $proxy=''; [Net.WebRequest]::DefaultWebProxy.Credentials=[Net.CredentialCache]::DefaultCredentials; if('%MVNW_USERNAME%' -ne '' -and '%MVNW_PASSWORD%' -ne ''){$proxy=[Net.WebRequest]::GetSystemWebProxy(); $proxy.Credentials=[Net.NetworkCredential]::new('%MVNW_USERNAME%','%MVNW_PASSWORD%');} try{Invoke-WebRequest -Uri ('https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar') -Proxy $proxy -ProxyUseDefaultCredentials -OutFile ('%__MVNW_JAR__%')}catch{Write-Error $_}}" 2>&1`) DO @(
|
|
IF "%%A"=="MVNW_ERROR" (
|
|
SET __MVNW_ERROR__=%%B
|
|
)
|
|
)
|
|
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
|
|
|
@SET MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
|
@IF NOT "%MAVEN_PROJECTBASEDIR%"=="" GOTO endDetectBaseDir
|
|
@SET MAVEN_PROJECTBASEDIR=%~dp0..
|
|
:endDetectBaseDir
|
|
|
|
@IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" (
|
|
powershell -noprofile "& {Invoke-WebRequest -Uri 'https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar' -OutFile '%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar'}"
|
|
)
|
|
|
|
@SET MAVEN_CMD_LINE_ARGS=%*
|
|
|
|
@REM Find Java
|
|
@SET JAVA_EXE=java.exe
|
|
@IF DEFINED JAVA_HOME (
|
|
@SET JAVA_HOME=%JAVA_HOME:"=%
|
|
@SET JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
)
|
|
|
|
@REM Execute Maven wrapper
|
|
"%JAVA_EXE%" ^
|
|
%JVM_CONFIG_MAVEN_PROPS% ^
|
|
%MAVEN_OPTS% ^
|
|
%MAVEN_DEBUG_OPTS% ^
|
|
-classpath "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" ^
|
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
|
org.apache.maven.wrapper.MavenWrapperMain %MAVEN_CMD_LINE_ARGS%
|