2

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?

Community
  • 1
  • 1
benstpierre
  • 32,833
  • 51
  • 177
  • 288

2 Answers2

3

Apparently just running compile from within the sbt console I started with JRebel enabled and started my container (via container:start) and refreshing my web page works.

benstpierre
  • 32,833
  • 51
  • 177
  • 288
  • Yeah... I don't see how you're missing the point at all. If you dont' use Eclipse or JRebel, there is no reason you should need to think about their JRebel plugins. To make SBT compile automatically when your code changes, try ~compile. – Dave Whittaker Jan 10 '14 at 01:10
3

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.