tools-deps 2023-05-06

What is the most similar command to lein deps? clj -X:deps prep?

Depends on what you think lein deps does

🤔 I was thinking about downloading project dependencies

I think prep would be fine for that, but I think -P is explicitly for that purpose

✅ 1

A long time ago lein would copy the dependencies jars into your projects directory tree instead of just using them out of m2, which if I recall was what lein deps originally did

clojure -P is the command you are looking for. The -P execution flag can also be used with other aliases via one of the other execution flags, e.g clojure -P -M:test/libs:build/libs to download the main dependencies and those for testing and building a project, as common in a CI workflow https://practical.li/clojure/clojure-cli/execution-options/#prepare-dependencies

That doc is really awesome, funny that I discovered clojure -P after running clj -h that is not my usual workflow, I prefer reading a doc. Thanks lot, this will be useful for my learning 🙂

👍 2