Permalink
Browse files

Turn off dev options for standalone jar

  • Loading branch information...
1 parent 8722156 commit b518561d8154c7f826d321577b83319de1cd63fa @weavejester committed Dec 11, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/leiningen/ring/jar.clj
@@ -13,14 +13,17 @@
(default-main-namespace project)))
(defn compile-main [project]
- (let [main-ns (symbol (main-namespace project))]
+ (let [main-ns (symbol (main-namespace project))
+ options (-> (select-keys project [:ring])
+ (assoc-in [:ring :open-browser?] false)
+ (assoc-in [:ring :stacktraces?] false)
+ (assoc-in [:ring :auto-reload?] false))]
(compile-form project main-ns
`(do (ns ~main-ns
(:require ring.server.leiningen)
(:gen-class))
(defn ~'-main []
- (ring.server.leiningen/serve
- '~(select-keys project [:ring])))))))
+ (ring.server.leiningen/serve '~options))))))
(defn add-main-class [project]
(update-project project assoc :main (symbol (main-namespace project))))

0 comments on commit b518561

Please sign in to comment.