Executing Lift Examples with SBT 0.11.3 and Eclipse

Table of contents
Reading Time: 2 minutes

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

For that

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)
vikas@vikas-laptop:~/w/knoldus/fleisure/information/simply_lift/samples/snippet_and_sitemap/project$ ls
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

Now execute

$ sbt eclipse
to generate the eclipse files

$sbt ~container:start
to start the webapp with Jetty

On localhost:8080, you should see something similar to

Written by 

Vikas is the CEO and Co-Founder of Knoldus Inc. Knoldus does niche Reactive and Big Data product development on Scala, Spark, and Functional Java. Knoldus has a strong focus on software craftsmanship which ensures high-quality software development. It partners with the best in the industry like Lightbend (Scala Ecosystem), Databricks (Spark Ecosystem), Confluent (Kafka) and Datastax (Cassandra). Vikas has been working in the cutting edge tech industry for 20+ years. He was an ardent fan of Java with multiple high load enterprise systems to boast of till he met Scala. His current passions include utilizing the power of Scala, Akka and Play to make Reactive and Big Data systems for niche startups and enterprises who would like to change the way software is developed. To know more, send a mail to hello@knoldus.com or visit www.knoldus.com

4 thoughts on “Executing Lift Examples with SBT 0.11.3 and Eclipse3 min read

Comments are closed.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading