Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
@echo off | ||
|
||
set PLAY_VERSION="2.0-RC1-SNAPSHOT" | ||
|
||
if defined JPDA_PORT set DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%JPDA_PORT%" | ||
|
||
set p=%~dp0 | ||
set p=%p:\=/% | ||
|
||
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999 -Dfile.encoding=UTF8 -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %* | ||
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
:begin | ||
@echo off | ||
|
||
setlocal | ||
|
||
set p=%~dp0 | ||
set p=%p:\=/% | ||
set buildScript=%~dp0framework\build.bat | ||
|
||
if exist "conf\application.conf" goto existingApplication | ||
|
||
|
@@ -12,19 +15,43 @@ java -Dsbt.ivy.home=%~dp0repository -Dplay.home=%~dp0framework -Dsbt.boot.proper | |
goto end | ||
|
||
:existingApplication | ||
if not "%1" == "clean" goto runCommand | ||
if not "%1" == "clean-all" goto runCommand | ||
|
||
:cleanCache | ||
call %~dp0framework\cleanIvyCache.bat | ||
if exist "target" rmdir /s /q target | ||
if exist "tmp" rmdir /s /q tmp | ||
if exist "logs" rmdir /s /q logs | ||
if exist "project\target" rmdir /s /q project\target | ||
if exist "project\project" rmdir /s /q project\project | ||
if exist "dist" rmdir /s /q dist | ||
|
||
shift | ||
if "%1" == "" goto endWithMessage | ||
|
||
:runCommand | ||
if "%1" == "" goto enterConsole | ||
|
||
call %~dp0framework\build.bat %* | ||
if "%1" == "debug" goto setDebug | ||
goto enterConsoleWithCommands | ||
|
||
:setDebug | ||
set JPDA_PORT=9999 | ||
shift | ||
|
||
if "%1" == "" goto enterConsole | ||
|
||
:enterConsoleWithCommands | ||
|
||
call %buildScript% %1 %2 %3 %4 %5 %6 %7 %8 %9 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
guillaumebort
Author
Contributor
|
||
goto end | ||
|
||
:enterConsole | ||
|
||
call %~dp0framework\build.bat play | ||
call %buildScript% play | ||
goto end | ||
|
||
:endWithMessage | ||
echo [info] Done! | ||
|
||
:end | ||
endlocal |
Specifying Windows command line arguments by number removes any '=' signs between the parameters. This causes system property overrides to break, eg.
-Dconfig.file=prod/application.conf
becomes 2 separate arguments-Dconfig.file
andprod/application.conf
which is invalid. Rather use%*
to append ALL remaining arguments as is, ie: