Searched docs, it appears there’s no concepts related to this. How to so similar things if I have code in a folder not called src/
?
Although there’s docs, I still feel lack of tricks to play with it. I would prefer various working examples better.
Searched docs, it appears there’s no concepts related to this. How to so similar things if I have code in a folder not called src/
?
Although there’s docs, I still feel lack of tricks to play with it. I would prefer various working examples better.
My bad. It’s called :paths
instead…
https://clojure.org/reference/deps_and_cli#_resolve_deps
The lib map lists all libraries, their selected coordinates, the
:paths
on disk, and a list of dependents that caused it to be included. Here you can see that data.priority-map was included as a dependency of core.cache.
When I built boot-tools-deps
, that was a mapping that I had to decide what to do with. Boot has :asset-paths
, :resource-paths
, and :source-paths
. The first is for things like images, CSS, etc that might need to be in the generated artifact (JAR) but don’t need to be on the classpath. The second is for things like source code, configuration files, and templates, that also need to be in the generated artifact and also need to be on the classpath. The third is for things like test code that need to be on the classpath (sometimes) but should not go into the generated artifact.
Accordingly, I decided to map :paths
from tools.deps
to :resource-paths
in Boot and :extra-paths
from tools.deps
to :source-paths
. It works for the common cases, and there’s always Boot’s sift
task to move things around if that doesn’t work for you out-of-the-box.
Of course, the CLI stuff only really cares about putting stuff on the classpath – it doesn’t care about non-classpath assets, nor generated artifacts.