Search code examples
clojuresymlinkleiningenflambo

Leiningen checkouts when library has a slash in its name


I'm trying to use the Checkout Dependencies feature in Leiningen to work on a project that uses a checkout of Flambo. My project.clj looks something like:

(defproject spark-streaming "0.1.0-SNAPSHOT"

:dependencies [[org.clojure/clojure "1.5.1"]
             [yieldbot/flambo "0.4.0-SNAPSHOT"]
             [amazonica "0.2.29"]
             [clj-time "0.8.0"]] ;other stuff omitted

My directory structure looks like this:

|- checkouts
  |- <need symlink to yieldbot/flambo>  
|- src
|- project.clj

What I tried:

  1. Since the library name contains a slash, I can't make a symlink named "yieldbot/flambo" to the actual location of Flambo.
  2. I can't do this either:

    |- checkouts |- yieldbot |- flambo //this is a symlink

because Lein expects a project.clj in the yieldbot directory. Doing lein classpath confirms that my checkout isn't being used.

  1. Directly checkout flambo into checkouts/yieldbot. Doesn't work, for the same reason as above

What can I do?


Solution

  • The only thing lein expects in the directory directly underneath checkouts is a project.clj file. The organization namespace is inferred from that project file, and has nothing to do with the directory structure above the symlink.

    In your flambo project file, make sure you have (defproject yieldbot/flambo "version" ... correctly. Then in your checkouts of your spark-streaming project, create a symlink to the flambo directory itself.