This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-10
Channels
- # announcements (6)
- # architecture (2)
- # babashka (30)
- # beginners (90)
- # calva (21)
- # cider (22)
- # clj-kondo (27)
- # cljs-dev (7)
- # clojure (132)
- # clojure-europe (51)
- # clojure-nl (12)
- # clojure-norway (3)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (69)
- # cloverage (9)
- # conjure (5)
- # core-async (54)
- # cursive (14)
- # datomic (34)
- # emacs (7)
- # fulcro (10)
- # graalvm (40)
- # graalvm-mobile (2)
- # gratitude (2)
- # improve-getting-started (1)
- # introduce-yourself (1)
- # jobs-discuss (61)
- # leiningen (5)
- # malli (6)
- # off-topic (59)
- # pathom (11)
- # polylith (38)
- # reagent (3)
- # reitit (3)
- # rewrite-clj (3)
- # shadow-cljs (53)
- # tools-build (35)
- # transit (8)
- # vim (62)
- # web-security (26)
- # xtdb (4)
I'm trying to set up a lein project to build two different uberjars, each using different versions of the same dependencies. Currently I've got something like:
:profiles
{:version-1 {:dependencies [[external-lib "1.0.0"]]}
:version-2 {:dependencies [[external-lib "2.0.0"]]}}
The first surprise is that lein with-profile +version-1 uberjar
fails to compile, because the classes from external-lib
aren't available during compilation.
Through trial and error, I've found that adding ^:leaky
metadata to the profiles allows lein with-profile +version-1 uberjar
to succeed, but then there's another surprise: the classes from external-lib
are actually not included in the uberjar. Is there a way to do this in lein?