javasbtjrebel

View exact java commands issued by SBT


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)


Solution

  • 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.