Skip to content

Commit

Permalink
Added option to omit-default-repositories.
Browse files Browse the repository at this point in the history
  • Loading branch information
David McNeil authored and technomancy committed Apr 7, 2010
1 parent f83bf73 commit 036b47d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/leiningen/deps.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
(.setId id)
(.setUrl url)))

(defn get-repository-list [project]
(concat
(if (:omit-default-repositories project)
{}
default-repos)
(:repositories project)))

(defn deps
"Download and install all :dependencies listed in project.clj into the lib/
directory. With an argument it will skip development dependencies. Dependencies
Expand All @@ -56,8 +63,7 @@ dependencies with the following:
(.setFilesetId deps-task "dependency.fileset")
(.setProject deps-task lancet/ant-project)
(.setPathId deps-task (:name project))
(doseq [r (map make-repository (concat default-repos
(:repositories project)))]
(doseq [r (map make-repository (get-repository-list project))]
(.addConfiguredRemoteRepository deps-task r))
(doseq [dep (:dependencies project)]
(.addDependency deps-task (make-dependency dep)))
Expand Down

0 comments on commit 036b47d

Please sign in to comment.