At work we rely heavily on :override-deps
in a project-wide deps.edn
file (we use CLJ_CONFIG
to pick up that instead of the user-level deps.edn
file). We have an alias called :defaults
that has :override-deps
with an entry for everything dependency that we want to "manage".
Our (mono-)repo has a versions
folder containing that project-wide file and then each subproject in the repo has its own deps.edn
file where we specify dependencies like this:
selmer {} ; omit :mvn/version "x.y.z"
And versions/deps.edn
has:
:aliases
{:defaults
{:override-deps
{selmer {:mvn/version "1.12.13"}
...}}}
Then we do this inside a subproject:
CLJ_CONFIG=../versions clojure -A:defaults <whatever else we need>