  (:use [hiccup core page-helpers]) 
  (:use [ring.adapter.jetty :only [run-jetty]])
  (:require [cauca.factory :as f]
+           [cauca.log :as log]
            [compojure.route :as route]
            [compojure.handler :as handler]
            [clojure.data.json :as json]

           )
 (:gen-class))

 (defn ui-template [body]
   (html4
    [:head
     [:title "Cauca UI"]
     (include-css "/css/bootstrap-1.1.0.css")
     (include-css "/css/style.css")
     (include-js "/js/jquery-1.6.2.min.js")

     (try
       (handler request)
       (catch Exception e
         (-> (resp/response (ui-template "Cauca UI" (exception->html e)))
           (resp/status 500)
           (resp/content-type "text/html"))
         ))))

 (def app
   (-> #'main-handler
       (wrap-reload '[cauca.component.rest])
       catch-errors))

 (defn start-server! [] (run-jetty app {:port 8080
                                        :join? false}))
 (defn -main [] (start-server!))
