leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
Shantanu Kumar 2021-01-28T13:48:31.003100Z

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 Kumar 2021-01-28T13:52:15.004200Z

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

Shantanu Kumar 2021-01-28T14:48:08.005Z

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

2021-01-28T18:16:55.005400Z

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

2021-01-28T18:17:43.006200Z

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.

2021-01-28T19:12:55.007Z

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

2021-01-28T19:13:12.007500Z

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

2021-01-28T19:13:23.007900Z

But perhaps yours always is.