使用 Leiningen 的 Clojars 镜像

Using a mirror of Clojars from Leiningen

以下 Wiki 页面描述了一种直接设置 Leiningen 以使用 Clojars.org 镜像的方法:https://github.com/clojars/clojars-web/wiki/Mirrors

基于此,我将以下内容作为我的~/.lein/profiles.clj

{:user {:mirrors 
        {#"clojars" {:name "clojars mirror" 
                     :url "https://clojars-mirror.tcrawley.org/repo/"}}}}

然而,即使有了这个 profiles.clj,我仍然可以看到例如lein 的 Wireshark 正在尝试连接到 clojars.org 而不是 clojars-mirror.tcrawley.org。我缺少什么设置?

我的莱宁根版本是

Leiningen 2.5.3 on Java 1.7.0_91 OpenJDK 64-Bit Server VM

我也无法通过修改 profile.clj 使镜像工作。

不过,我可以通过在 defproject

中添加它来使其适用于特定的 project.clj
  :mirrors {#"clojars" {:name "Clojar Mirror"
                    :url "https://clojars-mirror.tcrawley.org/repo/"
                    :repo-manager true}}

备注:

这来自莱宁根官方样本project.clj

我尝试按照下面的方法在 profile.clj 中进行全局设置(语法与您的语法有些不同)但没有成功: