I've tried to test everything in here but if you see any technical errors -- or just have Qs about stuff here -- please let me know in a thread. Thank you!
> tools.build is a library for building artifacts in Clojure projects, which are typically library .jar files for deployment to repositories like https://clojars.org for others to use or application .jar files to run on servers on in containers.
Is this the second "on" meant to be "or" on servers on in containers?
> Unlike https://leiningen.org/, which was more of a "batteries-included" approach, the CLI assumed that you would declare additional tooling through "aliases" in deps.edn that added extra dependencies and evolved, over time, to support both traditional command-line invocation
Did you mean ~/deps.edn here?
"adds" and "evolves"?
> └─$ clojure -T:build hello :name '"Build"'
> Hello, Build!
> └─$ clojure -T:build hello :name "Build"
> Hello, Build!
> └─$ clojure -T:build hello :name Build
> Hello, Build!
works without single quote or any quote.
2 :aliases
3 {
4 :api0 {:ns-default my-proj.api} ;; clojure -X:api0 foo :bar 42
5 :api1 {:ns-default my-proj.api ;; clojure -X:api1 :bar 42
6 :exec-fn my-proj.api/foo}
7 :api2 {:exec-fn my-proj.api/foo} ;; clojure -X:api2 :bar 42
8 :api3 {:ns-default my-proj.api ;; clojure -X:api3 :bar 42
9 :exec-fn foo}}
when :exec-fn is first introduced ns-default is still there perhaps exec-fn can be just "foo".
Great doc!@zengxh Thanks! on -- yes, typo, fixed; deps.edn is correct -- it could be your local project file or your user file; adds/evolves -- clarified that sentence (the aliases add dependencies, but the CLI evolved); '"Build"' is how you pass a string -- "Build" and Build both pass a symbol, which happens to work in this case but isn't technically correct (and I wanted, specifically, to highlight how to pass strings); :exec-fn -- since folks often have this without :ns-default, I wanted to show the fully-qualified version but I've added a comment saying it could be unqualified in this case. Good feedback!
a beginner question, in which directory in local the deps.edn stores the downloaded jar file?
Thanks 🙂
maybe ~/.m2
maven jars are all stored in the ~/.m2/repository cache