1

我正在尝试将档案设置为 leiningen 项目的代理存储库。我已经看到对以下键的引用:

:省略默认存储库

但它似乎没有工作。当我将 clojars 依赖项粘贴到我的项目文件中时,leiningen 仍然从 clojars 而不是我的代理中提取。我的项目文件如下所示:

(defproject test-archiva "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :repositories [["snapshots", "http://myserver:8080/archiva/repository/snapshots"]
                 ["releases", "http://myserver:8080/archiva/repository/internal"]]
  :omit_default_repositories true
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [incanter "1.4.1"]])

任何帮助,将不胜感激。

4

2 回答 2

1
(defproject test-archiva "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:repositories [["snapshots", "http://myserver:8080/archiva/repository/snapshots"]
             ["releases", "http://myserver:8080/archiva/repository/internal"]]
:omit-default-repositories true
:license {:name "Eclipse Public License"
        :url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
             [incanter "1.4.1"]])

试试看...看起来你有下划线而不是连字符

于 2013-02-07T01:12:00.580 回答
1

现在你可以写:

:repositories ^:replace [["snapshots", "http://myserver:8080/archiva/repository/snapshots"]
               ["releases", "http://myserver:8080/archiva/repository/internal"]]

我找不到哪个版本引入了此功能,但它适用于 2.3.4 或更高版本的 Leiningen。

于 2015-02-25T09:21:38.970 回答