Leinigen uses maven dependency management under the covers, so all dependencies are installed in
${HOME}/.m2/repository/${groupId-as-path}/${artifactId}/$[version}/${artifactId}-${version}.jar
where for [org.clojure/clojure "1.3.0"] groupId org.clojure , artifactId is set to clojure , and version 1.3.0 . groupIds are converted to paths, so groupId from org.clojure has an org/clojure path.
Depending on the maven specified in pom.xml, this will look like this:
<project> ... <dependencies> <dependency> <groupId>org.clojure</groupId> <artifactId>clojure</artifactId> <version>1.3.0</version> </dependency> </dependencies> ... </project>
Note. If no groupId is specified, then leiningen uses the same value for groupId and artifactId.
The advantage of using maven dependency management is that it handles transitive dependencies for you, i.e. if you determine dependence on something, you get everything that it depends on, and everything that these things depend on, etc. etc.
Therefore, in order to depend on the local project, the right thing is to install the local project in the local repository.
To save on the endless change of versions at the development stage, maven supports SNAPSHOT dependencies, as a result of which additional information is added to the version (mainly date-time), and maven knows that, say, 1.3.1-SNAPSHOT, it should look like for the latter version of this snapshot. This is caused by the naming convention {version} -SNAPSHOT.
In maven, you can specify system dependencies with a hard-coded path, but usually this bad practice is usually used for platform-dependent things, that is, it can have its own library component.
By default, the maven central repository is searched and leinigen adds clojars to the repository , which serves as the central repo for clojure jars.
leinigen uses this material under covers and creates a path to the class, referencing the banks in your local maven repository.
Note that you can generate pom.xml from the leinigen project using lein pom . Then you could manage it. A useful feature is
mvn dependency:tree
which gives an idea of ββthe art of ascii of all dependencies.