Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Lift Template for CloudBees.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Octocat-spinner-32 project added sbt June 28, 2012
Octocat-spinner-32 src Added tests September 05, 2012
Octocat-spinner-32 .gitignore we need the lib directory for this to work July 30, 2012
Octocat-spinner-32 Update May 06, 2013
Octocat-spinner-32 clickstart.json Update clickstart.json March 17, 2014
Octocat-spinner-32 icon.png lift icon August 08, 2012
Octocat-spinner-32 jenkins.xml Update jenkins.xml September 10, 2013
Octocat-spinner-32 pom.xml readme July 09, 2012
Octocat-spinner-32 sbt added sbt June 28, 2012
Octocat-spinner-32 sbt-launcher.jar added sbt June 28, 2012
Octocat-spinner-32 sbt.bat added sbt June 28, 2012

Scala and Lift ClickStart.

The Lift Framework is a popular web framework for the Scala Programming language. It is known for being very secure out of the box (notably so for preventing XSS flaws), scalable, and mature. It is handy for ajax/comet applications, and is "full stack" (ie comes with pretty much everything you need, including ORM). Lift is in use by some large public sites such as Foursquare.

This ClickStart bootstraps you with a working lift web application, a database, a source repository (populated, ready to go), a Jenkins build service running continuous deployment from the source repository (push a change, your project will be built and deployed).

You can use this as a starting point for your own lift application (remember the source repository will be private to your account).

Feel free to fork and make this your own - pull requests welcome !

Manual steps for deploying on CloudBees:

Create application:

bees app:create MYAPP_ID

Create database:

bees db:create -u DB_USER -p DB_PASSWORD DBNAME

Bind database as datasource:

bees app:bind -db DBNAME -a MYAPP_ID -as LiftDB

Create a new maven project in Jenkins, changing the following:

  • Add this git repository (or yours with this code) on Jenkins
  • Also check "Deploy to CloudBees" with those parameters:

    Applications: First Match
    Application Id: MYAPP_ID
    Filename Pattern: target/*.war

To build this locally:

In the lift_template directory, open a command line, and invoke maven by typing "mvn package" to build the war file, then deploy it on cloudbees typing:

bees app:deploy -a MYAPP_ID target/*.war

To run this locally:

Modify the src/main/scala/bootstrap/liftweb/Boot.scala file by commenting the following line:

DefaultConnectionIdentifier.jndiName = "jdbc/LiftDB"

And uncommenting the following:

val vendor = new StandardDBVendor(Props.get("db.driver") openOr "org.h2.Driver", 
Props.get("db.url") openOr "jdbc:h2:lift_proto.db;AUTO_SERVER=TRUE",
Props.get("db.user"), Props.get("db.password"))
LiftRules.unloadHooks.append(vendor.closeAllConnections_! _)
DB.defineConnectionManager(DefaultConnectionIdentifier, vendor)

Then finally run with jetty type "sbt update ~jetty-run" in the project directory, and then browse to localhost:8080

Something went wrong with that request. Please try again.