Plumb through mirror support to pomegranate. Fixes #271.

Won't actually be visible until pomegranate is bumped to 0.0.13.
This commit is contained in:
Phil Hagelberg 2012-06-25 11:08:59 -07:00
parent 13608e8036
commit a32abdf51c
4 changed files with 16 additions and 5 deletions

View file

@ -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 file

@ -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 file

@ -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 file

@ -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)