From 58e7b3d9a77b3fe8ee340c95ffb92eaa2de3a104 Mon Sep 17 00:00:00 2001 From: Stefan Bethge Date: Sun, 15 Apr 2012 19:32:44 +0200 Subject: [PATCH] sbt README changes and missing dependency for dev changes --- MavLift/.DS_Store | Bin 6148 -> 6148 bytes MavLift/README | 15 +++++++++++++-- MavLift/project/build.scala | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/MavLift/.DS_Store b/MavLift/.DS_Store index 6d6450171ab05407b5386718b108c3a4bfc1f1ce..cf270f2237ea6921222f42e8b4dd26a753527cbe 100644 GIT binary patch delta 298 zcmZoMXfc=|#>B)qu~2NHo}wr-0|Nsi1A_nqLn=cuLrGG3aY0hf#)Hcl>p?Q?3uW zQ&N)>i(DhRMB-Yf{)i(g$1O$vgzkmTRl!j4F8+-Iv mH?wo_a{&Fm@!)sn$^0U^A|P3ijs^$~*1S1HWCQcW1{MGU`AM(< delta 89 zcmZoMXfc=|#>CJzu~2NHo}vg70|Nsi1A_oVa!yiyeh!eyz&5c^W3qt=%jP>w+N_%u on0=Wxvvcrs0QGDZWd6=PnO{Vg6Qu3{5Hn1+;gQ}PBeH}U0EyHSvH$=8 diff --git a/MavLift/README b/MavLift/README index b518f20bf..058defbf8 100644 --- a/MavLift/README +++ b/MavLift/README @@ -1,9 +1,11 @@ This project contains some try outs so far. -The project is using Maven 2 as a build tool. See pom.xml for the dependancies. +The project is using sbt or Maven 2 as a build tool. See build.scala or pom.xml respectively for the dependencies. I used IntelliJ IDEA as my IDE. It has nice autocompletion. +---- + To compile and run jetty, cd into the root directory (where this file is) and run: $ sbt @@ -11,10 +13,13 @@ $ sbt > compile > ~;container:start; container:reload / -(Note that you first have to start sbt and then on its console start jetty with the container:start task, otherwise it will exit immediately.) +(Note that you first have to start sbt and then on its console start jetty with the container:start task, otherwise it will exit immediately. More here: https://github.com/siasia/xsbt-web-plugin/wiki) In OS X, sbt can be installed with $ sudo port install sbt +---- + + Alternatively, maven can also be used: mvn jetty:run @@ -32,6 +37,9 @@ Note: You may need to add the pluginGroup to the $HOME/.m2/settings.xml ... +---- + + To test one of the URL's use: curl http://localhost:8080/mongodb @@ -41,6 +49,9 @@ Other important files: SomeThing.scala - This file contains the URL routes (like urls.py) and my try outs- See serve case Req +---- + + I tried several approaches for scala talking to mongodb Lift Record: works for inserts and simple (inc geo) queries. but i couldn't figure out how to sort. diff --git a/MavLift/project/build.scala b/MavLift/project/build.scala index 3f355fd14..5946d8285 100755 --- a/MavLift/project/build.scala +++ b/MavLift/project/build.scala @@ -40,6 +40,7 @@ object LiftProjectBuild extends Build { "net.liftweb" %% "lift-mapper" % liftVersion % "compile", "net.liftweb" %% "lift-mongodb" % liftVersion % "compile", "net.liftweb" %% "lift-mongodb-record" % liftVersion % "compile", + "net.liftweb" %% "lift-widgets" % liftVersion % "compile", // "org.eclipse.jetty" % "jetty-webapp" % "7.5.4.v20111024" % "container", // "org.eclipse.jetty" % "jetty-webapp" % "8.0.4.v20111024" % "container", "org.mortbay.jetty" % "jetty" % "6.1.22" % "container",