1

I'm trying to set up archiva as our proxy repo for leiningen projects. I've seen references to the following key:

:omit-default-repositories

But it doesn't appear to be working. When I stick a clojars dependency into my project file leiningen is still pulling from clojars rather than my proxy. My project file looks like the following:

(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"]])

Any help would be appreciated.

Alex Miller
  • 69,183
  • 25
  • 122
  • 167
jgerman
  • 2,161
  • 3
  • 13
  • 10

2 Answers2

2
(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"]])

try that...looks like you had underscores instead of hyphens

djjolicoeur
  • 484
  • 3
  • 7
2

Now you can write:

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

I can't find which verion introduce this feature but it works with 2.3.4 or higher version of Leiningen.

Zed
  • 41
  • 3