Permalink
Browse files

Updated templates to no longer user .ssp

Also updated some other things in the templates

- updated web plugin version and configuration
- sbt 0.11.2 prefers to have a plugins.sbt file in /project so we
  no longer need a /project/plugins folder
  • Loading branch information...
mads-hartmann committed Dec 7, 2011
1 parent c9d38bc commit c44d7a8c59b9d9d62c537f45581d189d6922a968
View
@@ -1,31 +1,32 @@
Lifty 1.7
=========
Lifty
=====
Lifty is a plugin that adds scaffolding to SBT 0.11.x (Simple Build Tool). It's easy to teach Lifty about new scaffolding templates, you just have to give it the url to recipe and it will download the templates and you're set.
Getting started
---------------
Simply follow these steps
You need to have SBT installed (any version of SBT in th 0.11.x series should do)
Now, add lifty as a global plugin by adding the following line to your `~/.sbt/plugins/build.sbt` file:
addSbtPlugin("org.lifty" % "lifty" % "1.7.4")
- Install SBT 0.11.1 (or any in the 0.11.x series)
- Create a global plugin .sbt file: ~/.sbt/plugins/build.sbt
- Add the following to that file: addSbtPlugin("org.lifty" % "lifty" % "1.7.2")
Whenever you're in a SBT session you now have the `lifty` command avaiable. The `lifty` command has tab-completion
enabled to make it faster/easier to use. Try typing `lifty` and hit tab in an SBT session.
Now you have lifty installed. So to create a new Lift project simple do this:
Now that you have Lifty installed you need to teach it how to generate different files for you. You
do so by pointing lifty to a recipe. Here's a [list](http://lifty.github.com/ List) of all currently known recipes.
- Create a new SBT project
- In the SBT console
- > lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
- > lifty create lift project
- > reload
- > container:start
- > container:stop
Here's what you would have to type to teach Lifty about Lift projects and templates
About 1.7
-----------
> lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json
The nice thing about Lifty 1.7 is that templates are now stored online together with a
description file (in json). This means that templates, arguments (and their default values)
can be updated easily. This should make it a lot easier for the community to help maintain lifty :)
To create a fresh Lift webapp and start it simply type:
It's also a whole lot easier to extend lifty. You simply create some new templates and a json descriptor
and you're up and running :)
> lifty create lift project
> reload
> container:start
> container:stop
Now point your browser to http://localhost:8080
View
@@ -217,7 +217,6 @@
{ "name" : "project-blank",
"description" : "Creates a blank Lift project that uses SBT as it's build system",
"folders" : [
"project/plugins",
"src/main/resources/props",
"src/main/scala/bootstrap/liftweb",
"src/main/scala/${mainpack}/comet",
@@ -242,7 +241,7 @@
{ "file" : "main_build.ssp",
"destination" : "build.sbt"},
{ "file" : "plugin_build.ssp",
"destination" : "project/plugins/build.sbt"},
"destination" : "project/plugins.sbt"},
{ "file" : "LiftConsole.scala",
"destination" : "src/test/scala/LiftConsole.scala"},
{ "file" : "RunWebApp.scala",
@@ -1,5 +1,3 @@
<%@ var mainpack:String %>
package ${mainpack} {
package snippet {
@@ -1,2 +1 @@
List(Menu(Loc("Static", Link(List("static"), true, "/static/index"),
"Static Content"))) :::
List(Menu(Loc("Static", Link(List("static"), true, "/static/index"), "Static Content"))) :::
@@ -1,5 +1,3 @@
<%@ var mainpack:String %>
package ${mainpack} {
package snippet {
@@ -1,5 +1,3 @@
<%@ var mainpack:String %>
package ${mainpack} {
import java.io.File
@@ -1,5 +1,3 @@
<%@ var mainpack:String %>
package bootstrap.liftweb
import net.liftweb._
@@ -1,7 +1,3 @@
<%@ var liftversion:String %>
<%@ var projectName:String %>
<%@ var scalaVersion:String %>
name := "${projectName}"
scalaVersion := "${scalaVersion}"
@@ -12,8 +8,6 @@ resolvers += "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"
libraryDependencies += "net.liftweb" %% "lift-webkit" % "${liftversion}" % "compile->default"
libraryDependencies += "org.mortbay.jetty" % "jetty" % "6.1.22" % "container"
libraryDependencies += "junit" % "junit" % "4.5" % "test->default"
libraryDependencies += "javax.servlet" % "servlet-api" % "2.5" % "provided->default"
@@ -26,4 +20,6 @@ libraryDependencies += "ch.qos.logback" % "logback-classic" % "0.9.26" % "compil
resolvers += "Java.net Maven2 Repository" at "http://download.java.net/maven/2/"
seq(webSettings :_*)
seq(webSettings :_*)
libraryDependencies += "org.mortbay.jetty" % "jetty" % "6.1.22" % "container"
@@ -1,7 +1 @@
resolvers += "Web plugin repo" at "http://siasia.github.com/maven2"
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
resolvers += Resolver.url("Typesafe repository", new java.net.URL("http://typesafe.artifactoryonline.com/typesafe/ivy-releases/"))(Resolver.defaultIvyPatterns)
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v+"-0.2.9"))
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v+"-0.2.10"))
@@ -1,6 +1,3 @@
<%@ var cometName:String %>
<%@ var cometpack:String %>
package ${cometpack}
import net.liftweb._
@@ -1,5 +1,3 @@
<%@ var libpack:String %>
package ${libpack}
import net.liftweb.http._
@@ -1,6 +1,3 @@
<%@ var modelName:String %>
<%@ var modelpack:String %>
package ${modelpack}
import net.liftweb.mapper._
@@ -1,6 +1,3 @@
<%@ var snippetName:String %>
<%@ var snippetpack:String %>
package ${snippetpack}
import scala.xml.{NodeSeq}
@@ -1,5 +1,3 @@
<%@ var liftversion:String %>
libraryDependencies += "net.liftweb" %% "lift-mapper" % "${liftversion}" % "compile->default"
libraryDependencies += "com.h2database" % "h2" % "1.2.138"
@@ -1,4 +1,3 @@
<%@ var modelpack:String %>
import net.liftweb._
import mapper.{Schemifier, DB, StandardDBVendor, DefaultConnectionIdentifier}
import util.{Props}
@@ -1,5 +1,3 @@
<%@ var modelpack:String %>
package ${modelpack} {
import net.liftweb._

0 comments on commit c44d7a8

Please sign in to comment.