Subproject Dependencies

Raynes edited this page Jun 16, 2011 · 1 revision

Sometimes one or more of your dependencies are other projects you are working on, and you want to track changes to those projects without having to release them to clojars. To do this, simply add a Java property named subproject.<project-name> with the path to the git checkout to .cake/config, like this:

subproject.clojure-useful   = /Users/justin/projects/useful
subproject.clojure-complete = /Users/justin/projects/complete

Now instead of fetching these projects from clojars, cake deps will run cake jar in each project checkout and copy the resulting jar along with all deps into your main project's lib directory. You still have to run cake deps for subproject changes to show up in your main project, but this is probably best in most cases.

If you really do want changes to clojure source files to show up immediately, you can always add the subproject src directory to your project classpath in .cake/config like this:

project.classpath = /Users/justin/projects/useful/src

In order to add multiple project paths to your classpath, you need to separate them with a colon:

project.classpath = /Users/justin/projects/useful/src:/Users/justin/projects/also-useful/src