tools-deps

jmv 2024-07-18T18:01:45.955489Z

what is the best way to change the default maven directory from ~/.m2? i need to move it to a different directory for annoying ci/cd reasons

Alex Miller (Clojure team) 2024-07-18T18:08:55.906839Z

you can set the local repo in your deps.edn with :mvn/local-repo "..."

Alex Miller (Clojure team) 2024-07-18T18:09:19.051899Z

or at the CLI via the -Sdeps: -Sdeps '{:mvn/local-repo "..."}

seancorfield 2024-07-18T18:09:37.495559Z

See https://clojure.org/reference/deps_edn#procurers_mvn

jmv 2024-07-18T18:18:37.468579Z

thanks! can i set the :mvn/local-repo in an alias?

Alex Miller (Clojure team) 2024-07-18T18:20:04.850589Z

no, but I think there is a ticket to think about that

jmv 2024-07-18T18:29:03.547979Z

thanks! for context, we use drone and each step runs in its own docker image. this causes a lot of things to be blown away between steps unless it's you save it in the local dir across build steps. with lein, i setup this in our projects:

:local-repo
  ~(when (System/getenv "DRONE") ".m2")