JRebel and sbt do very different things.
Sbt is an alternative to maven. It's a build tool. You can get continuous 
compilation with maven by typing mvn scala:cc. Sbt currently has better 
dependency analysis, to know when to recompile what. Maven currently has two 
modes: -Drecompilation-mode=modified-only, which only recompiles changed files, 
no dependencies; and the default, which recompiles everything.
Eclipse also provides continuous compilation.
JRebel has a different purpose. By default a running Java program remembers 
classes that it loads into memory, so recompiling a class doesn't impact the 
running program. By attaching JRebel, it will detect changed .class files and 
the JVM will use the new ones.
As I said there are still some occasions when you must stop and restart jetty.
I use eclipse, m2eclipse (maven), and JRebel.
Maven integration with eclipse has the important advantage of putting the 
dependencies in the project's classpath. There is a plugin for eclipse that 
does the equivalent via sbt instead of maven.


-------------------------------------
jlist9<[email protected]> wrote:

I'm new to maven so I just followed the Lift Getting Started
guide, which uses "mvn jetty:run" to start jetty and ctrl-c to stop it.

I used sbt before for another project that uses a different framework
and like it that it auto-compiles the changed files and restarts jetty
(as far as I remember - it's been a while.) So far I haven't tried JRebel
yet so I'm not sure if it offers more than what sbt does but I'm
interested in finding out.

When doing that project, I pretty much used a simple text editor
to write scala code and I missed the features provided by eclipse
or netbeans. So I'm hoping that there is a way to use sbt and
eclipse or netbeans (I think the netbeans scala plug-in works better
than the eclipse's plugin but I'm OK with usine eclipse since that's
my default Java environment), and maybe add JRebel to the picture
if it does something that sbt doesn't offer.

I understand that the dev environment is a personal choice but I
think it would be nice to have a recommended set up that makes
use of neat tools like sbt and the free JRebel library. It would be
helpful for people who are new to Lift or Scala in general.

On Mon, Jan 18, 2010 at 10:58 PM, Naftoli Gugenheim
<[email protected]> wrote:
> How do you launch jetty? If it's an eclipse maven launch, specify JRebel in 
> the JVM arguments. For command-line maven, specify it in the MAVEN_OPTS 
> environment variable.
> If you launch via sbt (assuming there's such a thing) then you have to check 
> the sbt docs.
> Ultimately the command line that launches java.exe (or equivalent) to run 
> jetty should have -noverify -javaagent:path/to/jrebel.jar in it.
> If the question was about sbt with eclipse, there's a plugin that provides 
> sbt dependencies as classpath container.
> It is indeed very convenient to use JRebel. Most changes are viewable 
> immediately (though at times reloading classes is slow). Exceptions are 
> significant changes to a class like implementing a new interface (and due to 
> scala's abundance of syntactic sugar these are more often than you'd thin), 
> and changes to things set in Boot, since it's only run once. That doesn't 
> include functions etc. defined in Boot--if you pass a PartialFunction to a 
> LiftRules configuration, changes to its body will be reflected immediately.
>
> -------------------------------------
> jlist9<[email protected]> wrote:
>
> Thanks.
>
> "The Eclipse incremental compiler, Jetty & the JRebel plugin makes for
> fairly rapid turnaround times."
>
> This is interesting. I wonder if there are instructions somewhere online
> about how to use Eclipse + sbt + JRebel for Lift development. The Lift
> Get Started Guide mentions a lot of start and stop Jetty. The impression
> I got from reading it is that's how Lift development is done. I'm sure
> there is a better way :-)
>
> On Mon, Jan 18, 2010 at 12:44 PM, Jeppe Nejsum Madsen <[email protected]> 
> wrote:
>> Hi,
>>
>> A while ago, I started writing an experience report on using Scala &
>> Lift. I finally finished this (it has been a little more than 6 months
>> now, time is flying :-)
>>
>> http://jeppenejsum.wordpress.com/2010/01/18/scala-and-lift-status-after-six-months/
>>
>> /Jeppe
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
>
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to