After reading http://macstrac.blogspot.com/2010/01/using-sbt-on-your-scala-maven-proje... I have manged to set up environment for SBT with JRebel.
First of all I had to download SBT from http://code.google.com/p/simple-build-tool/, than I have looked at Lift prototype on http://liftweb.net/, the main problem was that I had already project build on Maven and Lift 1.0, so these were mine steps:
1) add val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository" to LiftProject.scala from prototype, I have also change the Lift version, and comment out dependencies cause I want them from pom.xml
2) I had to add also val smackRepo = "m2-repository-smack" at "http://maven.reucon.com/public" cause ivy couldn't download it
3) for JRebel I have uncommented override def scanDirectories = Nil
4) build.properties I haven't changed too much only names and Scala's version
5) in pom.xml I have added javarebel-maven-plugin, when using sbt it want be too useful but for future launching it's a must
6) last thing is a sbt.bat (cause I'm still using Windows on my old laptop, if only I could buy MBP :) - I need exactly 2 lines:
set SCRIPT_DIR=%~dp0
java -Xmx512M -XX:MaxPermSize=512M -noverify -javaagent:"C:\Program Files\ZeroTurnaround\JRebel\jrebel.jar" -jar "%SCRIPT_DIR%sbt-launch-0.7.4.jar" %*
PermGen Space was thrown earlier, so it's helpful
7) that's all - now I could run sbt:
sbt.bat
> update
> ~jetty
and I have got the recompiling sources, JRebel ready, with Maven integration environment. This is large speedup of Scala/Lift development.
Comments
why JRebel with SBT?
...when using ~prepare-webapp in SBT does the samet then JRebel does?
Just started using SBT, and I was happy to find out I didn't even need to setup JRebel it seems. :)
/Gabriel
How can SBT replace JRebels
How can SBT replace JRebels functonality?
Mike