View exact java commands issued by SBT

回眸只為那壹抹淺笑 提交于 2019-12-11 19:18:37

问题


I'm trying to integrate jrebel with an SBT project. The following entry is in the build.scala file:

javaOptions ++= Seq("-javaagent:/path/to/jrebel.jar", "-Drebel.log=true", "-Drebel.log.file=/path/to/jrebel.log")

However, I'm not seeing any Jrebel output when SBT is started (or, for that matter, when files are updated) so I'd like to know if there is an SBT command/switch that can used to display the exact java commands that SBT is issuing? (maybe it's a versioning-format difference? I'm using SBT version 0.12.2)


回答1:


You did something strange.

If you wish to add jrebel to SBT you must add javaagent parameter to your command that invoke sbt-launch.jar Also don't forget properties file. ??? Your Build.scala is so huge? Incredible.

If you with to add jrebel to Scala application then SBT out of scope at all. Just start you app somewhere and it will reload recompiled classes. You need only specify where compiled class files is located. Then use sbt > ~package-bin. It is like maven, ant or any other build system.

IMHO javaOptions affect only specific tasks that fork jvm - like compilation, tests and so on.



来源:https://stackoverflow.com/questions/16473259/view-exact-java-commands-issued-by-sbt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!