16 lines
670 B
Batchfile
16 lines
670 B
Batchfile
|
|
@REM Maven Wrapper for Windows
|
||
|
|
@echo off
|
||
|
|
setlocal
|
||
|
|
|
||
|
|
set MAVEN_HOME=%USERPROFILE%\.m2\wrapper\dists\apache-maven-3.9.6
|
||
|
|
if exist "%MAVEN_HOME%\bin\mvn.cmd" goto execute
|
||
|
|
|
||
|
|
echo Downloading Maven...
|
||
|
|
powershell -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip' -OutFile '%TEMP%\maven.zip' }"
|
||
|
|
powershell -Command "& { Expand-Archive -Path '%TEMP%\maven.zip' -DestinationPath '%USERPROFILE%\.m2\wrapper\dists' -Force }"
|
||
|
|
del "%TEMP%\maven.zip"
|
||
|
|
|
||
|
|
:execute
|
||
|
|
call "%MAVEN_HOME%\bin\mvn.cmd" %*
|
||
|
|
exit /b %errorlevel%
|