Last active
December 24, 2015 11:29
-
-
Save yedi/6791051 to your computer and use it in GitHub Desktop.
How would I get lein uberjar to return a jar that has the manifest file?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns skateproj.handler | |
(:use compojure.core | |
sandbar.stateful-session) | |
(:require [clojure.string :as str] | |
[skateproj.db :as db] | |
[compojure.handler :as handler] | |
[compojure.route :as route] | |
[skateproj.routes :as r] | |
[ring.adapter.jetty :refer [run-jetty]]) | |
:gen-class) | |
(defroutes app-routes | |
;; .. | |
) | |
(defn re-check [s rgx] | |
(not (empty? (re-find rgx s)))) | |
(defn add-trailing-slash | |
"If the requested url has no trailing slash, add it." | |
[handler] | |
(fn [request] | |
(if (.endsWith (:uri request) "/") | |
(handler request) | |
(let [newurl (str/replace (:uri request) #"(?<=.)$" "/")] | |
{:status 301 :headers {"Location" newurl}})))) | |
(def app (-> app-routes | |
handler/site | |
add-trailing-slash | |
wrap-stateful-session)) | |
(defn start-server [port] | |
(run-jetty app {:port port})) | |
(defn -main [& args] | |
(let [port (Integer. (or (first args) "5000"))] | |
(start-server port))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yedis-MacBook-Pro:skateproj yedianyansi$ lein ring server | |
Compiling skateproj.handler | |
Exception in thread "main" java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword | |
at clojure.lang.RT.seqFrom(RT.java:505) | |
at clojure.lang.RT.seq(RT.java:486) | |
at clojure.lang.RT.first(RT.java:578) | |
at clojure.core$first.invoke(core.clj:55) | |
at clojure.core$ns$fn__4932.invoke(core.clj:5236) | |
at clojure.core$filter$fn__4234.invoke(core.clj:2533) | |
at clojure.lang.LazySeq.sval(LazySeq.java:42) | |
at clojure.lang.LazySeq.seq(LazySeq.java:67) | |
at clojure.lang.LazySeq.first(LazySeq.java:82) | |
at clojure.lang.RT.first(RT.java:577) | |
at clojure.core$first.invoke(core.clj:55) | |
at clojure.core$ns.doInvoke(core.clj:5236) | |
at clojure.lang.RestFn.invoke(RestFn.java:525) | |
at clojure.lang.Var.invoke(Var.java:435) | |
at clojure.lang.AFn.applyToHelper(AFn.java:185) | |
at clojure.lang.Var.applyTo(Var.java:532) | |
at clojure.lang.Compiler.macroexpand1(Compiler.java:6468) | |
at clojure.lang.Compiler.macroexpand(Compiler.java:6529) | |
at clojure.lang.Compiler.compile1(Compiler.java:7138) | |
at clojure.lang.Compiler.compile(Compiler.java:7219) | |
at clojure.lang.RT.compile(RT.java:398) | |
at clojure.lang.RT.load(RT.java:438) | |
at clojure.lang.RT.load(RT.java:411) | |
at clojure.core$load$fn__5028.invoke(core.clj:5530) | |
at clojure.core$load.doInvoke(core.clj:5529) | |
at clojure.lang.RestFn.invoke(RestFn.java:408) | |
at clojure.core$load_one.invoke(core.clj:5336) | |
at clojure.core$compile$fn__5033.invoke(core.clj:5541) | |
at clojure.core$compile.invoke(core.clj:5540) | |
at user$eval7.invoke(NO_SOURCE_FILE:1) | |
at clojure.lang.Compiler.eval(Compiler.java:6619) | |
at clojure.lang.Compiler.eval(Compiler.java:6609) | |
at clojure.lang.Compiler.eval(Compiler.java:6582) | |
at clojure.core$eval.invoke(core.clj:2852) | |
at clojure.main$eval_opt.invoke(main.clj:308) | |
at clojure.main$initialize.invoke(main.clj:327) | |
at clojure.main$null_opt.invoke(main.clj:362) | |
at clojure.main$main$fn__6661.invoke(main.clj:440) | |
at clojure.main$main.doInvoke(main.clj:437) | |
at clojure.lang.RestFn.invoke(RestFn.java:421) | |
at clojure.lang.Var.invoke(Var.java:419) | |
at clojure.lang.AFn.applyToHelper(AFn.java:163) | |
at clojure.lang.Var.applyTo(Var.java:532) | |
at clojure.main.main(main.java:37) | |
Compilation failed: Subprocess failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject skateproj "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:dependencies [[org.clojure/clojure "1.5.0"] | |
[org.clojure/data.json "0.2.2"] | |
[compojure "1.1.5"] | |
[korma "0.3.0-RC2"] | |
[mysql/mysql-connector-java "5.1.24"] | |
[clojurewerkz/scrypt "1.0.0"] | |
[clabango "0.4"] | |
[isaacsu/sandbar "0.4.1"] | |
[abengoa/clj-stripe "1.0.3"] | |
[cheshire "5.2.0"] | |
[clojurewerkz/elastisch "1.1.1"] | |
[ring "1.2.0"]] | |
:jvm-opts [;; stuff] | |
:resource-paths ["resources"] | |
:plugins [[lein-ring "0.8.2"] | |
[lein-beanstalk "0.2.7"]] | |
:main skateproj.handler | |
:aot [skateproj.handler] | |
:ring {:handler skateproj.handler/app | |
:auto-reload? true | |
:auto-refresh true} | |
:profiles {:dev {:dependencies [[ring-mock "0.1.3"]]}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
project.clj
:... :dependencies [[ring "1.2.0"] ...] :main _.handler :aot [_.handler] ...