Dave Sann <daves...@gmail.com> writes:

> Hey Rob, Thanks for your reply,
>
> I will try that for my projects
>
> My use case is slightly different though. I want to be able to build other 
> peoples projects from source (e.g. from github) without editing any of the 
> project.clj files - but still overriding to use my local repository.
>
> Any ideas?

Quick and dirty hack is adding to init.clj something like this:

;;; ~/.lein/init.clj ;;;

(defn customize
  "Customize default repos"
  [new-repos]
  (alter-var-root #'leiningen.core/default-repos
                  (fn [p] (leiningen.core/repositories-for
                           {:omit-default-repositories true
                            :repositories new-repos}))))

(customize {"releases"
            "http://artifactory/artifactory/libs-release";
            "snapshots" 
            "http://artifactory/artifactory/libs-snapshot";
            "local-release" 
            "http://artifactory/artifactory/libs-release-local"})
;;;;;;;;;;;;;;;;;;;;;

I haven't really thought all consequences of this hack through,
so use it on your own risk. ;-)

HTH,
Rob

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to