diff --git a/MavLift/.DS_Store b/MavLift/.DS_Store index 6d6450171..cf270f223 100644 Binary files a/MavLift/.DS_Store and b/MavLift/.DS_Store differ 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",