Browse files

add ch 17 maven README

  • Loading branch information...
1 parent d9032d3 commit 775da7fd3606748bcf8eb7b7e0100ce69239ffe0 @cemerick cemerick committed Apr 4, 2012
Showing with 41 additions and 0 deletions.
  1. +41 −0 ch17-webapp-maven/
@@ -0,0 +1,41 @@
+## _Clojure Programming_, Chapter 17
+### Developing Clojure web applications with Maven and Jetty
+This project contains a simple Clojure web application that can be
+started and reloaded using Maven and Jetty via the maven-jetty-plugin.
+#### Running
+In a terminal:
+$ mvn jetty:run
+(…or, if you're using Eclipse or another IDE with "built
+in" Maven support, you can run the `jetty:run` goal in it…)
+This will start the Jetty server on port 8080, running the Clojure
+You can restart the Jetty server by hitting return in the terminal. It
+is possible to use this mechanism to reload the Clojure application
+after making changes, etc., but a far more flexible and efficient
+approach to interactive development would be to either:
+* include a REPL server (either
+ [nREPL]( or
+[swank]( in your webapp,
+and connect to it from your development environment (e.g.
+[Counterclockwise / Eclipse](
+or [vim]( or
+your other favorite editor/IDE that provides quality Clojure REPL
+support). From there, you can load new code into the running webapp
+with abandon.
+* start the Jetty server from a REPL using the ring-jetty-adapter, to
+ which you can provide the top-level var of your webapp. Of course,
+since you're using a REPL, and new code you load will be utilized

0 comments on commit 775da7f

Please sign in to comment.