Search code examples
scalasbtliftjrebel

Jrebel/SBT how to recompile webapp without restart


So I have figured out how to run an SBT demo project with

>SBT

>container:start

I could do a

>container:restart

Every time I make a code change but this is why I installed JREBEL. I simply added the following option "-javaagent:/usr/bin/jrebel/jrebel.jar" to /opt/local/bin/sbt.sh which seems to load Jrebel fine.

The only problem I have now is how to tell my application to recompile, possibly automatically so JRebel can pick up the changes and reload my webapp as needed.

Any ideas?


Solution

  • If you can't use JRebel in the current situation, you can consider using DCEVM which enables better hot-swapping of code. With the sbt target

    ~compile

    it should be picked up immediately.