predict all dependencies that boot-clj need to build a project

80 views Asked by At

Usually boot stores all it's fetched dependencies in a local maven repository, which is located in ~/.m2/repository .

When setting the environment variable BOOT_LOCAL_REPO to another directory, it will only use the chosen one.

consider this:

boot new -n my -t app
cd my
mkdir repo
export BOOT_LOCAL_REPO=$(pwd)/repo

boot build

boot will now fetch all the jars it needs to the local repo folder.

when calling boot build a second time, there will be nothing to be fetched and the building starts instantaneously.

I'm developing a boot task that generates nix-expressions form boot files. For this I need to predict all the dependencies that boot needs to build a project. basically, the content of the repo folder. this works only partly: The best result I get when using the following inside my boot task:

(def dependency-jars
  (-> (boot.core/get-env)
      :boot-class-path
      (s/split #":")
      (->> (filter #(re-find #"\.m2" %)))))

Those jars I'd fetch externally and store it in the repo folder. However, when running boot build there are still some jars that boot will fetch. This should be avoided. For instance it happens with those:

Retrieving oss-oparent-7.pom from https://repo1.maven.org/maven2/ (5k)
Retrieving shimdandy-parent-1.2.0.pom from https://repo1.maven.org/maven2/ (2k)
[..]

(Actually it looks that boot only needs the poms and not the jars of those files)

Does anybody know how to identify them?

0

There are 0 answers