Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leiningen: how to exclude dependencies when uberjaring?

When using leiningen to build Clojure applications, how can certain dependencies be excluded from being included in the JAR file when using lein uberjar?

like image 800
pmf Avatar asked Dec 01 '14 12:12

pmf


1 Answers

Use the provided entry for the leiningen profile.

 :profiles {:dev {:dependencies [[ring-mock "0.1.5"]
                                 [prismatic/dommy "0.1.3"]
                                 [org.bouncycastle/bcprov-jdk15on "1.50"]]}
            :provided {:dependencies [[org.bouncycastle/bcprov-jdk15on "1.50"]]}}

One common use case is bouncycastle that needs to be excluded from the signed JAR and provided externally using its own jar file in runtime.

like image 134
guilespi Avatar answered Sep 27 '22 20:09

guilespi