Recently we got our hands back on a Lift project after some time. A few of our clients had already moved from Lift to Play due to various reasons and one of them seemed to be dismal (read valid) documentation. There seem to be decent information like simply.liftweb.net and exploring.liftweb.net along with the book Lift in Action. But most of these resources seem to be still in the dark ages of getting built by sbt 0.7.5 and what not. I had a hard time getting a colleague of mine getting set up with the basic lift examples given that the other projects that we are currently executing are already on the latest versions. Anyway, here is a quick guide to get you out of the woods, faster.
Let us take an example, say you want to try the code from Snippets and Sitemap. You might want to clone the project from here https://github.com/dpp/simply_lift. You would find snippets and sitemap in the samples folder.
Now one option is to execute it with the sbt-launcher which comes along. Another is to get it converted to the relatively later version of sbt 0.11.3 (ok the latest on the block is 0.13) and use it from there
0) First delete everything in the folder except the src folder
1) Introduce a build.sbt at the following root location which reads like this
2) To start a container add the following plugin.sbt under the project folder (if you do not have a project folder, just create one)
plugin.sbt project target
That should look like this
3) I am assuming you already have an eclipse plugin entry under your ~/.sbt/plugins/build.sbt
If not, add the following line
$ sbt eclipse
to generate the eclipse files
to start the webapp with Jetty
On localhost:8080, you should see something similar to
4 thoughts on “Executing Lift Examples with SBT 0.11.3 and Eclipse3 min read”
Hey Vikas ,
I am getting below error while running git clone command :-
Cloning into snippet_and_sitemap…
fatal: https://github.com/dpp/simply_lift/tree/master/samples/snippet_and_sitemap/info/refs not found: did you run git update-server-info on the server?
Please let me know if I am missing something .
Yeah thanks for the catch, i updated the instructions to download the simply-lift project, instead of the snippets* project.
Thanks !..It worked for me ..
For documentation, there’s also the start of a Cookbook at: http://cookbook.liftweb.net/
Regarding more up-to-date SBT versions, the official SBT 0.11.3 Lift template is at https://github.com/lift/lift_25_sbt (discussed at https://groups.google.com/forum/#!topic/liftweb/6Xb219jQQz0%5B1-25%5D)
Comments are closed.