clojure and leiningen – using a git repository as dependency

Is it possible to have leiningen pull a project directly from a git repository (on github) as a 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.


Based on the accepted answer, there is now a leiningen plugin for managing git-deps:

  • Is there a Leiningen plugin that provides Git info?
  • How to get runtime access to version number of a running Clojure application?
  • How to add the cvs head of a project as dependency?
  • 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 [[""

    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 checkouts in
    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
    checkouts will take precedence over the dependency declared in
    project.clj. Note that this is not a replacement for listing the
    project in :dependencies; it simply supplements that for convenience.

    Git Baby is a git and github fan, let's start git clone.