Simplify and fix script on Windows

This commit is contained in:
rfscholte 2021-05-16 23:55:21 +02:00
parent d139dd68f7
commit 45ef48c405
1 changed files with 4 additions and 9 deletions

View File

@ -24,25 +24,20 @@
CALL :normalizePath %MAVENCODEBASE%
CALL :maven && CALL :maven-integration-testing
@GOTO :eof
@REM If behind a proxy try this..
@REM mvn clean install -Prun-its,embedded -Dmaven.repo.local=%cd%\repo -Dproxy.host=<host> -Dproxy.port=<port> -Dproxy.user= -Dproxy.pass= -Dproxy.nonProxyHosts=<hosts>
:: ========== FUNCTIONS ==========
:maven
CALL mvn clean verify -DdistributionFileName=${project.artifactId} -f "%_MAVENCODEBASE%" || exit /B
:maven-integration-testing
if exist "%_MAVENCODEBASE%\maven-wrapper\target\maven-wrapper.jar" (
CALL mvn clean install -Prun-its,embedded -Dmaven.repo.local="%cd%\repo" -DmavenDistro="%_MAVENCODEBASE%\apache-maven\target\apache-maven-bin.zip" -DwrapperDistroDir="%_MAVENCODEBASE%\apache-maven\target" -DmavenWrapper="%_MAVENCODEBASE%\maven-wrapper\target\maven-wrapper.jar" || exit /B
)
else (
) else (
CALL mvn clean install -Prun-its,embedded,!maven-wrapper -Dmaven.repo.local="%cd%\repo" -DmavenDistro="%_MAVENCODEBASE%\apache-maven\target\apache-maven-bin.zip" || exit /B
)
@GOTO :eof
:normalizePath
SET _MAVENCODEBASE=%~dpfn1