Fork me on GitHub
#tools-deps
<
2023-05-06
>
Eduardo Lopes22:05:30

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

hiredman23:05:13

Depends on what you think lein deps does

Eduardo Lopes23:05:55

:thinking_face: I was thinking about downloading project dependencies

hiredman23:05:12

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

2
hiredman23:05:19

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

practicalli-johnny06:05:27

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

Eduardo Lopes18:05:32

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 🙂

👍 4