From 0681d1f96279d7eefe87416d79e005ecb65cad1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Bernardo=20Galkin?= Date: Tue, 5 Jul 2011 20:21:05 -0300 Subject: [PATCH] Added :checkout-deps-shares option Used to specify other directories added to the classpath from the checked out projects. --- sample.project.clj | 7 +++++++ src/leiningen/classpath.clj | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sample.project.clj b/sample.project.clj index fa77d0c88..84df9561b 100644 --- a/sample.project.clj +++ b/sample.project.clj @@ -69,6 +69,13 @@ ;; use a regex that will be matched against filenames in the project root. ;; Defaults to #"^$NAME-.*\.jar$". :regex-to-clean #"hs_err_pid.*" + ;; Load dependencies from checkouts/ directory. Set this to be a vector of + ;; functions that take the target project as argument. + ;; The default is [:source-path :compile-path :resources-path] + ;; but you could also add, for instance, :test-path to share tests, or + ;; ~(fn [p] (str (:root p) "/lib/dev/*")) to load also development dependencies + ;; from the checked out project (Java 1.6+) + :checkout-deps-shares ;; Load these namespaces on startup to pick up hooks from them. Hooks ;; generally come from plugins, but may be included in your project source. :hooks [leiningen.hooks.difftest] diff --git a/src/leiningen/classpath.clj b/src/leiningen/classpath.clj index 6942b4eb6..84c10aa1e 100644 --- a/src/leiningen/classpath.clj +++ b/src/leiningen/classpath.clj @@ -25,8 +25,8 @@ ;; Note that this resets the leiningen.core/project var! :let [proj (read-dependency-project dep)] :when proj] - (for [d [:source-path :compile-path :resources-path]] - (ensure-absolute (proj d) dep))))) + (for [d (:checkout-deps-shares project [:source-path :compile-path :resources-path])] + (ensure-absolute (d proj) dep))))) (defn user-plugins [] (for [jar (.listFiles (file (leiningen-home) "plugins"))