How can I teach tools.build to look for local jars in a dir other than ~/.m2/repository ? I have the top level key :mvn/local-repo in my deps.edn which works for running code/repl, but not when I'm trying to build an uber jar with tools.build
can you be more specific about which tools.build task doesn't work?
in general, tools.build tasks are driven by the basis you are using (created via create-basis in your build script), and that will (by default) use your project deps.edn, including it's :mvn/local-repo setting
clojure.tools.build.api/uber is the function i'm calling
what you are describing should work. why do think the :mvn/local-repo is not being used
here is the error report. To simulate the ci environment this should run in locally i have symlinked ~/.m2 -> dev/null
Ah I might be using tools.build incorrectly
aha, so I misspoke. :mvn/local-repo is not defined in my project's deps.edn but in my ~/.config/clojure/deps.edn . If I copy it to my project deps, then the uberjar builds
I would prefer not to define it in the project.deps since that would affect all developers building the project. Shouldn't :mvn/local-repo work if defined in the global deps.edn?
Yeah, the basis used in tools.build does not include that deps.edn source by default for reproducibility reasons, but you can do so if you like
In the call to create-basis, pass :user :standard
many thanks