Improve startup scripts

This closes #636
* Properly name jump labels for jvm.config in cmd
* Supply one arg per line
This commit is contained in:
Michael Osipov 2021-12-20 17:28:07 +01:00
parent 33aedfc28b
commit e6287b4701
3 changed files with 6 additions and 4 deletions

View File

@ -84,11 +84,11 @@ cd /d "%EXEC_DIR%"
:endDetectBaseDir
set "jvmConfig=\.mvn\jvm.config"
if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%" goto endReadAdditionalConfig
if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%" goto endReadJvmConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
:endReadJvmConfig

View File

@ -16,4 +16,5 @@ exec "$JAVACMD" \
"-Dmaven.home=$MAVEN_HOME" \
"-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \
"-Dmaven.multiModuleProjectDirectory=$MAVEN_PROJECTBASEDIR" \
$LAUNCHER_CLASS "$@"
$LAUNCHER_CLASS \
"$@"

View File

@ -7,7 +7,8 @@
"-Dmaven.home=%MAVEN_HOME%" ^
"-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%LAUNCHER_CLASS% %*
%LAUNCHER_CLASS% ^
%*
if ERRORLEVEL 1 goto error
goto end