tools-build

DrNick 2022-02-22T19:11:44.174969Z

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 🙂

2022-02-22T19:41:31.173789Z

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

Alex Miller (Clojure team) 2022-02-22T20:34:21.704359Z

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

seancorfield 2022-02-22T20:39:11.715379Z

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.

DrNick 2022-02-23T10:49:32.128369Z

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

seancorfield 2022-02-22T20:40:43.288539Z

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.