I was hitting an issue building uberjars in a project I work on.
The error, for reference, was
$ lein with-profile production uberjar
Error: Could not find or load main class clojure.main
Compilation failed: Subprocess failed
Uberjar aborting because jar failed: Compilation failed: Subprocess failed
Error encountered performing task 'uberjar' with profile(s): 'production'
Uberjar aborting because jar failed: Compilation failed: Subprocess failed
The issue turned out to be I had a legal ~/.lein/profiles.clj, but the relevant section (:uberjar) was outside the closing bracket. It took me a bit of digging to notice that, future users of leiningen might appreciate a warning about ignored garbage detected after the first form in profiles.clj
{:user {:plugins [
[lein-repo "0.2.1"]
[cider/cider-nrepl "0.12.0"]
]
:dependencies [[org.clojure/tools.nrepl "0.2.12"]]}} ;; form actually closes here
:uberjar {:plugins [
[lein-repo "0.2.1"]
]}} ;; should have been closed here
Thanks for all the hard work on this great project!
I was hitting an issue building uberjars in a project I work on.
The error, for reference, was
The issue turned out to be I had a legal
~/.lein/profiles.clj
, but the relevant section (:uberjar
) was outside the closing bracket. It took me a bit of digging to notice that, future users of leiningen might appreciate a warning about ignored garbage detected after the first form inprofiles.clj
Thanks for all the hard work on this great project!