Fork me on GitHub
#tools-build
<
2022-02-22
>
Nicolas Estrada19:02:44

Hello, I'm writing some SPIs for keycloak in clojure, and well I may be nickpicky but I want to create uberjars without the keycloak provided dependancies (since I know they are already included). I can't seem to find any documentation of examples of how I would achieve such behviour with tools.build? I'm actually using @seancorfield's build-clj to be precise. Any pointers would be much appreciated 🙂

hiredman19:02:31

put the keycloak deps in a separate alias, and don't include that alias when jaring

Alex Miller (Clojure team)20:02:21

yes that - you can build the basis with whatever aliases or even ad hoc deps you need, and use a different basis for compiling vs uberjar'ing. This might not be easy to do through build-clj, I would just use tools.build directly

seancorfield20:02:11

Agreed. If you need a different basis for compilation and for uberjarring, then you'll need the low-level control of tools.build directly @nicolas.estrada938 -- build-clj assumes the same basis for both compile-clj and uber under the hood.

Nicolas Estrada10:02:32

Thanks for the clarification, I'm going to postpone making my uberjar as smallest as possible for the moment 😅

seancorfield20:02:43

depstar used to support that via a complex set of options to differentiate between compiling and jar'ing but since tools.build supports that explicitly and it's a "non-default" use case, I didn't see the point in making build-clj do it.