I'm trying to understand "Lieningen" behaviour when creating an uberjar
. Following is the minimal example which reproduces the behaviour:
(ns my-stuff.core
(:gen-class))
(def some-var (throw (Exception. "boom!")))
(defn -main [& args]
(println some-var))
When this is executed with lein run
it clearly fails with an Exception. However, I don't understand why executing lein uberjar
also fails with an Exception from variable definition? Why executing lein uberjar
attempts to evaluate the variable value? Is this speecific to uberjar
task or am I missing something more substantial about Clojure or Leiningen?