jgerman
jgerman

Reputation: 2191

leiningen 2 omitting default repositories?

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.

Upvotes: 1

Views: 259

Answers (2)

Zed
Zed

Reputation: 41

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.

Upvotes: 2

djjolicoeur
djjolicoeur

Reputation: 484

(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

Upvotes: 2

Related Questions