On Fri, Apr 17, 2009 at 10:00 AM, James Strachan <[email protected]>wrote:
> > Hello Lifters! > > BTW apologies in advance if this is an obvious newbie question - I did > a fair bit of searching on the list and saw JavaRebel discussions etc. > > I've been taking my first baby steps with Scala/Lift (this Scala/Lift > malarkey is starting to grow on me) so I followed the getting started > guide. My first surprise (after using Rails/JSP etc) was hitting > reload on a browser after changing a snippet doesn't reload the > snippet code - you've gotta stop/restart mvn jetty:run. (Though > changing the template does). > > I just wondered if someone had figured out the ninja to get the > jetty:run plugin to auto-detect snippet changes? This could well be a > tooling issue (e.g. when using eclipse with its incremental compiling > generating new class files might solve the problem) - I'm using IDEA > currently. > > I did wonder if we could come up with a way to configure the jetty:run > plugin to do the right thing though irrespective of your IDE; using > the scala incremental compiler maybe? I tried adding a jetty custom > scan target to the pom... > > <plugin> > <groupId>org.mortbay.jetty</groupId> > <artifactId>maven-jetty-plugin</artifactId> > <configuration> > <contextPath>/</contextPath> > <scanIntervalSeconds>1</scanIntervalSeconds> > <scanTargetPatterns> > <scanTargetPattern> > <directory>src/main/scala</directory> > <includes> > <include>**/*.scala</include> > </includes> > </scanTargetPattern> > </scanTargetPatterns> > </configuration> > </plugin> > > which forces a restart fine - but it doesn't know to recompile the > Scala code. So I'm wondering if we setup the scala compiler to auto > build the code to a classes directory that the jetty plugin can then > auto-detect and restart the web app? This command line will keep the class files up to date. Using JavaRebel is better than having Jetty reload the classes and Jetty will destroy sessions on reload. mvn scala:cc > > > I just wondered if others had hit this issue & come up with an elegant > solution; to force incremental compilation of the Scala class files - > or maybe I should just switch to eclipse? > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://fusesource.com/ > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
