clojure and leiningen – using a git repository as dependency
Using Bundler with Ruby, it is possible to map a gem to a git repo, allowing for rapid development and integration of dependent projects.
- How to add the cvs head of a project as dependency?
- How to get runtime access to version number of a running Clojure application?
- Is there a Leiningen plugin that provides Git info?
Based on the accepted answer, there is now a leiningen plugin for managing git-deps:
2 Solutions collect form web for “clojure and leiningen – using a git repository as dependency”
I just found this in clojurescriptone’s project.clj
I think it maybe helpful to you:
:git-dependencies [["https://github.com/clojure/clojurescript.git" "886d8dc81812962d30a741d6d05ce9d90975160f"] ["https://github.com/levand/domina.git" "8933b2d12c44832c9bfaecf457a1bc5db251a774"]]
The file is here.
Leiningen won’t do the pulling for you (edit: not out of the box, anyway; following the lead from Sunng’s answer leads one to discover that a plugin has been written for this — see also my comment on that answer; checkout deps remain a good, built-in solution), but you can have checkouts of other projects put on the classpath. This functionality is described in the FAQ section of the README; here’s the relevant Q&A:
Q: I want to hack two projects in parallel, but it’s annoying to
switch between them.
A: If you create a directory called
your project root and symlink some other project roots into it,
Leiningen will allow you to hack on them in parallel. That means
changes in the dependency will be visible in the main project without
having to go through the whole
install/switch-projects/deps/restart-repl cycle, and the copy in
checkoutswill take precedence over the dependency declared in
project.clj. Note that this is not a replacement for listing the
:dependencies; it simply supplements that for convenience.