Fork me on GitHub
Shantanu Kumar13:01:31

When I put :local-repo "local-m2" under a :local profile, even when I say lein with-profile local do clean, test it still downloads the plugin dependencies in ~/.m2 instead of ./local-m2. Can anybody suggest how to download all plugins in the specified repo?

Shantanu Kumar13:01:15

Or maybe if there’s a way to add :local-repo "local-m2" to project map only if an ENV var is set?

Shantanu Kumar14:01:08

OK, I fixed it by putting :local-repo ~(System/getenv "M2") at the top-level under defproject.


I think I’ve done something similar to that in the past


I’d have to look up exact details. But think it needs to be determined at top level since during profile merging it’s too late.


Confirmed. I used env var via top-level key with ~ eval like you had above


And ensure it defaults to standard when env variable not set.


But perhaps yours always is.