Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade sbt build to proper build

Also added in missing search dependency for twirl, so we don't need full paths anymore
Updated readme a bit
set default version number
  • Loading branch information...
commit cbb54b5d58f97befea09ce0d654df5003ab50c51 1 parent 2ddf65c
@bruntonspall authored
View
2  project/project/plugins.scala
@@ -2,5 +2,5 @@ import sbt._
object PluginDef extends Build {
lazy val root = Project("plugins", file(".")) dependsOn( g8plugin )
lazy val g8plugin =
- ProjectRef(uri("git://github.com/n8han/giter8#0.4.5"), "giter8-plugin")
+ ProjectRef(uri("git://github.com/n8han/giter8#0.4.5.1"), "giter8-plugin")
}
View
23 readme.md
@@ -20,6 +20,12 @@ Enjoy
Michael Brunton-Spall
+Requirements
+------------
+
+ * [Giter8](https://github.com/n8han/giter8/)
+ * [SBT 0.11.2 or 0.11.3-2](https://github.com/harrah/xsbt)
+
Usage
-----
@@ -36,4 +42,19 @@ scala_version [2.9.1]:
objectify_version [4.0a3]:
Applied bruntonspall/appengine-objectify-scala.g8 in my-test-app
-```
+
+(mbrunton-spall@GNM31330 ~/work)% cd my-test-app
+(mbrunton-spall@GNM31330 ~/work/my-test-app)% sbt
+...
+[info] Done updating.
+My Scalatra AppEngine Objectify Project > package
+[info] Compiling twirl template .../welcome.scala.html to .../welcome.template.scala
+[info] Formatting 5 Scala sources {file:/Users/mbrunton-spall/work/appengine-objectify-scala.g8/target/g8/}My Scalatra AppEngine Objectify Project(compile) ...
+[info] Reformatted 4 Scala sources {file:/Users/mbrunton-spall/work/appengine-objectify-scala.g8/target/g8/}My Scalatra AppEngine Objectify Project(compile).
+[info] Compiling 6 Scala sources to /Users/mbrunton-spall/work/appengine-objectify-scala.g8/target/g8/target/scala-2.9.1/classes...
+[info] Packaging /Users/mbrunton-spall/work/appengine-objectify-scala.g8/target/g8/target/scala-2.9.1/my-scalatra-appengine-objectify-project_2.9.1-.war ...
+[info] Done packaging.
+[success] Total time: 11 s, completed Jun 24, 2012 1:17:46 AM
+My Scalatra AppEngine Objectify Project > appengine-dev-server
+```
+When running an appengine app from scala, you don't use container:start, you use appengine-dev-server. I pair it with JREBEL and ~package personally, but your millage may vary.
View
25 src/main/g8/build.sbt
@@ -1,25 +0,0 @@
-name := "$name$"
-
-version := "$version$"
-
-organization := "com.example"
-
-scalaVersion := "$scala_version$"
-
-resolvers += "Objectify Repo" at "http://objectify-appengine.googlecode.com/svn/maven"
-
-libraryDependencies ++= Seq(
- "com.googlecode.objectify" % "objectify" % "$objectify_version$",
- "org.scalatra" %% "scalatra" % "$scalatra_version$",
- "javax.persistence" % "persistence-api" % "1.0",
- "com.google.appengine" % "appengine-api-1.0-sdk" % "1.6.2",
- "ch.qos.logback" % "logback-classic" % "0.9.26",
- "com.weiglewilczek.slf4s" %% "slf4s" % "1.0.7",
- "org.scalatest" %% "scalatest" % "1.6.1" % "test",
- "javax.servlet" % "servlet-api" % "2.3" % "provided",
- "org.mortbay.jetty" % "jetty" % "6.1.22" % "container")
-
-seq(appengineSettings: _*)
-
-seq(Twirl.settings: _*)
-
View
1  src/main/g8/default.properties
@@ -4,3 +4,4 @@ package=com.example
scala_version=2.9.1
objectify_version=4.0a3
scalatra_version=2.0.4
+version=1.0.0
View
45 src/main/g8/project/$name;format="camel"$Build.scala
@@ -0,0 +1,45 @@
+import sbt._
+import Keys._
+import sbtappengine.Plugin.appengineSettings
+import com.typesafe.sbtscalariform.ScalariformPlugin.scalariformSettings
+import twirl.sbt.TwirlPlugin._
+
+object $name;format="camel"$Build extends Build {
+
+ lazy val basicSettings = seq(
+ version := "$version$",
+ organization := "$package$",
+ description := "$description$",
+ scalaVersion := "$scala_version$",
+ scalacOptions := Seq("-deprecation", "-encoding", "utf8")
+ )
+
+
+ // configure prompt to show current project
+ override lazy val settings = super.settings ++ basicSettings :+ {
+ shellPrompt := { s => Project.extract(s).currentProject.id + " > " }
+ }
+
+ lazy val root = Project(id="$name$", base=file("."))
+ .settings(
+ libraryDependencies ++= Seq(
+ "com.googlecode.objectify" % "objectify" % "$objectify_version$",
+ "org.scalatra" %% "scalatra" % "$scalatra_version$",
+ "javax.persistence" % "persistence-api" % "1.0",
+ "org.skife.com.typesafe.config" % "typesafe-config" % "0.3.0",
+ "com.google.appengine" % "appengine-api-1.0-sdk" % "1.6.5",
+ "ch.qos.logback" % "logback-classic" % "0.9.26",
+ "com.weiglewilczek.slf4s" %% "slf4s" % "1.0.7",
+ "cc.spray" %% "spray-json" % "1.1.1",
+ "commons-codec" % "commons-codec" % "1.6",
+ "org.scalatest" %% "scalatest" % "1.6.1" % "test",
+ "javax.servlet" % "servlet-api" % "2.3" % "provided",
+ "org.mortbay.jetty" % "jetty" % "6.1.22" % "container")
+ )
+ .settings(appengineSettings: _*)
+ .settings(scalariformSettings: _*)
+ .settings(Twirl.settings: _*)
+ .settings(
+ Twirl.twirlImports := Seq("$package$.model._")
+ )
+}
View
1  src/main/g8/project/build.properties
@@ -0,0 +1 @@
+sbt.version=0.11.2
View
2  src/main/g8/project/plugins.sbt
@@ -9,4 +9,6 @@ resolvers ++= Seq(
addSbtPlugin("com.eed3si9n" % "sbt-appengine" % "0.4.0")
+addSbtPlugin("com.typesafe.sbtscalariform" % "sbtscalariform" % "0.3.1")
+
addSbtPlugin("cc.spray" % "sbt-twirl" % "0.5.2")
View
2  src/main/g8/src/main/twirl/welcome.scala.html
@@ -1,4 +1,4 @@
-@(user:$package$.model.User)
+@(user:User)
<!DOCTYPE html>
<html lang="en">
<head>
Please sign in to comment.
Something went wrong with that request. Please try again.