An even simpler solution is to use lein checkouts
as documented here: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies
Create a dir checkouts
at the top level of your project (parallel to the src
dir). Within checkouts
, just create a symbolic link to the directory of the project with the library code. For example, consider a project clj
and a library tupelo
drwxrwxr-x 10 alan alan 4096 Jan 5 12:09 clj/
drwxrwxr-x 11 alan alan 4096 Jan 9 20:01 tupelo/
The project clj
would look like so:
> d clj clj/* clj/checkouts/*
drwxrwxr-x 10 alan alan 4096 Jan 12 10:36 clj/
drwxrwxr-x 2 alan alan 4096 Oct 14 09:23 clj/checkouts/
lrwxrwxrwx 1 alan alan 17 Oct 30 16:44 clj/checkouts/tupelo -> /home/alan/tupelo/
drwxrwxr-x 2 alan alan 4096 Aug 31 10:05 clj/doc/
-rw-rw-r-- 1 alan alan 11219 Aug 31 10:05 clj/LICENSE
-rw-rw-r-- 1 alan alan 794 Jan 5 12:09 clj/project.clj
-rw-rw-r-- 1 alan alan 457 Aug 31 10:05 clj/README.md
drwxrwxr-x 2 alan alan 4096 Jan 3 09:01 clj/resources/
drwxrwxr-x 3 alan alan 4096 Aug 31 10:05 clj/src/
drwxrwxr-x 8 alan alan 4096 Nov 14 16:26 clj/target/
drwxrwxr-x 3 alan alan 4096 Sep 29 22:31 clj/test/
Now, when building the clj
project, it will (always) use source code from ~/tupelo
instead of clojars, maven, etc. This means you don't have to make & (re-)install a jar from the lib tupelo
everytime you make a change that you want to use in clj
.
my-library
is included as agit submodule
? In particular, is it's relationship to the project such that it is not just another dependency? – Stirk