Search code examples
eclipsescalascala-2.8lifthotdeploy

Scala / Lift: Set up hotdeploy through Eclipse?


How do I set up hotdeploy for Scala/Lift projects in Eclipse?

Basically, I would like to be able to

  1. Set up a new project, from say lift-archetype-basic
  2. Launch jetty:run, either from some run-configuration or through terminal
  3. Be able to edit Scala files in Eclipse, Save/Auto compile
  4. Refresh the web-page in the browser and see the updates.

The tutorial at http://wiki.liftweb.net/index.php/Using_eclipse_hotdeploy is out-dated and I really can't figure out how to set this up.

I currently have

  • Eclipse 3.5
  • Maven IAM plugin version 0.11
  • Scala plugin 2.8.0.RC6

Should I use any other versions or plugins?


Solution

  • With SBT it's possible to continuously recompile and reload the web application when using Jetty:

    jetty-run
    ~ prepare-webapp
    

    jetty-run starts Jetty and the ~ prepare-webapp recompiles and recreates the web application whenever sources files change.

    SBT is compatIble with Maven and Ivy, so you may generate the project file layout with Maven archetypes, and switch to SBT later - it will recognize repositories and dependencies specified in the POM.

    This tutorial video shows, how to get stated with SBT and Eclipse.