How to create a Clojure Monorepo
Suppose that you want to create a basic clojure monorepo without using large frameworks such as Bazel or Polylith, then this is what you would do.
Assuming that you have a basic monorepo setup as so. I've removed most of the files typically associated in a clojure project setup for clarity purposes:
.
|____deps.edn
|____modules
| |____lib1
| | |____deps.edn
| |____lib2
| | |____deps.edn
The root deps.edn file should have in its dependencies each library or project referenced.
:deps {modules/lib1 {:local/root "modules/lib3"}
modules/lib3 {:local/root "modules/lib3"}}
Each library in your monorepo should include any of the local libraries that it is using in its deps.edn file as shown in the below example.
:deps { modules/lib1 {:local/root "../lib1"}
That is how you have a quick and basic clojure monorepo setup.