I have a project that works fine using lein run
. Now I want to compile it into a standalone jar using lein uberjar
. However, there are a couple of source files in my src/projectname/
directory called e.g. playground.clj
and stats.clj
that I use for experimenting with emacs & the repl, but that I don't want to compile for the final project.
With something like make
, I would specify all files that should be compiled. With clojure/leiningen, it seems, all files are compiled by default - how can I exclude files? I haven't found anything in the leiningen docs.
I am currently using :aot :all
. Is this the place to change something? Again, I couldn't find detailed documentation on this.
UPDATE:
The suggestions so far haven't worked. What has worked, however, is to include all desired namespaces instead of excluding the ones that should not be compiled. E.g.:
(defproject myproject "version"
;; ...
:profiles {:uberjar {:aot [myproject.data
myproject.db
myproject.util]}})
:uberjar-exclusions [#".*stats.clj" #".*playground.clj"]
, didn't change anything – Emblematize