Permalink
Browse files

Plumb through mirror support to pomegranate. Fixes #271.

Won't actually be visible until pomegranate is bumped to 0.0.13.
  • Loading branch information...
1 parent 13608e8 commit a32abdf51c07921f688d6bff427597420500f573 @technomancy committed Jun 25, 2012
Showing with 16 additions and 5 deletions.
  1. +3 −2 leiningen-core/src/leiningen/core/classpath.clj
  2. +8 −0 sample.project.clj
  3. +1 −0 src/leiningen/deps.clj
  4. +4 −3 todo.org
@@ -111,8 +111,8 @@
(last (take-while identity (iterate (memfn getCause) e))))
(defn- get-dependencies
- [dependencies-key {:keys [repositories local-repo offline? update checksum]
- :as project}
+ [dependencies-key {:keys [repositories local-repo offline? update
+ checksum mirrors] :as project}
& {:keys [add-classpath?]}]
{:pre [(every? vector? (project dependencies-key))]}
(try
@@ -125,6 +125,7 @@
(map add-repo-auth)
(map (partial update-policies update checksum)))
:coordinates (project dependencies-key)
+ :mirrors mirrors
:transfer-listener :stdout
:proxy (get-proxy-settings))
(catch Exception e
View
@@ -161,6 +161,14 @@
;; dependency resolution.
:deploy-repositories {"releases" "http://blueant.com/archiva/internal/releases"
"snapshots" "http://blueant.com/archiva/internal/snapshots"}
+ ;; Fetch dependencies from mirrors. Mirrors override repositories when the key
+ ;; in the :mirrors map matches either the name or URL of a specified
+ ;; repository. All settings supported in :repositories may be set here too.
+ :mirrors {"central" {:name "Ibiblio"
+ :url "http://mirrors.ibiblio.org/pub/mirrors/maven2"}
+ #"clojars" {:name "Internal nexus"
+ :url "http://mvn.local/nexus/releases"
+ :repo-manager true}}
;; Prevent Leiningen from checking the network for dependencies.
;; This wouldn't normally be set in project.clj; it would come from a profile.
:offline? true
View
@@ -46,6 +46,7 @@
dep (into (vec (take 2 dep)) (apply concat dep-map))]
(try (->> (aether/resolve-dependencies
:repositories (:repositories project)
+ :mirrors (:mirrors project)
:coordinates [dep])
(aether/dependency-files)
(filter #(.endsWith (.getName %) ".asc"))
View
@@ -14,10 +14,11 @@ See also https://github.com/technomancy/leiningen/issues
- [X] Address gpg agent issues (#615)
- [X] Stale directory clutter (#589)
- [X] Fix de-dupe with :classifier/:extension (#645)
+ - [X] Check project for :scm (#640)
+ - [X] Mirror support (#271)
- [ ] Allow jars to be signed, document in deploying guide. (#519)
- - [ ] Mirror support (#271)
- - [ ] Warn when <scm> isn't in pom (#641)
- - [ ] Check project for :scm (#640)
+ - [ ] Fix javac to abort on failure (#658)
+ - [ ] Only look up repo credentials when necessary (#657)
** preview4
- [X] Don't re-extract native deps (#535)
- [X] Make offline profile use dev profile (#514) (LHF)

0 comments on commit a32abdf

Please sign in to comment.