Passing -Dconfig.resource to start script & runPlay task
- Dominant language
- Java
- Stars
- 47
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
Hi, currently the start script & the `runPlay` task are passing options like -Dconfig.resource incorrectly to the play server.
Start script generated by this plugin
```
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %MAIN_OPTS% -classpath "%CLASSPATH%" play.core.server.ProdServerStart %CMD_LINE_ARGS%
```
Start script generated by sbt play
```
if "!_TEST_PARAM:~0,2!"=="-D" (
rem test if this was double-quoted property "-Dprop=42"
for /F "delims== tokens=1,*" %%G in ("!_TEST_PARAM!") DO (
if not ["%%H"] == [""] (
set _JAVA_PARAMS=!_JAVA_PARAMS! !_PARAM1!
) else if [%2] neq [] (
rem it was a normal property: -Dprop=42 or -Drop="42"
call set _PARAM1=%%1=%%2
set _JAVA_PARAMS=!_JAVA_PARAMS! !_PARAM1!
shift
)
)
) else (
if "!_TEST_PARAM!"=="-main" (
call set CUSTOM_MAIN_CLASS=%%2
shift
) else (
set _APP_ARGS=!_APP_ARGS! !_PARAM1!
)
)
shift
goto param_loop
:param_afterloop
set _JAVA_OPTS=!_JAVA_OPTS! !_JAVA_PARAMS!
/* ... */
"%_JAVACMD%" !_JAVA_OPTS! !ACLICKTOGO_OPTS! -cp "%APP_CLASSPATH%" %MAIN_CLASS% !_APP_ARGS!
```
As you can see, the options starting with `-D` are extracted and merged into `JAVA_OPTS` before passing to the play server.
Currently, I'm working around this problem by setting `JAVA_OPTS="-Dconfig.resource=application.dev.conf"` before running the start script but hopefully some fixes will be made so this plugin behaves the same as sbt-play
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.