Fork me on GitHub
#leiningen
<
2016-08-08
>
mss15:08:58

trying to package up an application as an uberjar – is there a way to do so via lein without actually booting the application (i.e. running my main function)? is there something I’m missing about how the clojure compiler works under the hood?

mss15:08:29

my profile.clj looks like:

:main ^:skip-aot path-to-main-fn
  :profiles {:uberjar {:aot :all}})

danielcompton22:08:56

@mss your app’s main function isn’t called (I’m pretty sure?), but the code in your project is evaluated, so if you have side effecting def’s like:

(def app (start-my-app))
then those side effecting defs will be run