Skip to content

Commit

Permalink
Improve startup scripts
Browse files Browse the repository at this point in the history
This closes #636
* Properly name jump labels for jvm.config in cmd
* Supply one arg per line
  • Loading branch information
michael-o committed Dec 20, 2021
1 parent 33aedfc commit e6287b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apache-maven/src/assembly/shared/init.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 2 additions & 1 deletion apache-maven/src/assembly/shared/run
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
"$@"
3 changes: 2 additions & 1 deletion apache-maven/src/assembly/shared/run.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e6287b4

Please sign in to comment.