Fork me on GitHub
#leiningen
<
2022-02-10
>
brandon00:02:38

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?

mikerod02:02:01

Are you using AOT?

mikerod02:02:17

I'd expect leaky to be all you need

mikerod02:02:23

From what you have said

mikerod02:02:54

You can try adding DEBUG=true prior to the lein command and see if you can get any more details