Fork me on GitHub
#tools-deps
<
2020-02-26
>
cfleming01:02:28

Am I correct in thinking that this commit is what’s needed to read the authentication for a particular repo from settings.xml? https://github.com/clojure/tools.deps.alpha/commit/658074337ce9577c9f1298fd5146a3029308748c

Alex Miller (Clojure team)01:02:37

Yes, modulo any later changes

cfleming01:02:11

Ok, I’ll look at that. Seems pretty magic in there. It’s odd that that functionality isn’t part of the resolver itself, it seems to live in a Maven jar.

dominicm08:02:04

I think I ported something I found in the maven cli code. Was a bit of a hunt.

neupsh20:02:49

Hello, I have @seancorfield’s deps.edn file from https://github.com/seancorfield/dot-clojure in my ~/.clojure/deps.edn and I am running clj -A:rebel:deps to start a clojure repl with rebel-readline and tools.deps.alpha for adding libraries from within the repl. So, to be able to add library, I will have to (require '[clojure.tools.deps.alpha.repl :refer [add-lib]]) before I can call add-lib. Is there a way to auto require this in the user namespace so that when I start the repl, I have it available there?

seancorfield20:02:33

@neupsh You have to split the resource/main opts:

> clj -R:rebel:deps -e "(require '[clojure.tools.deps.alpha.repl :refer [add-lib]])" -m rebel-readline.main
[Rebel readline] Type :repl/help for online help info
user=> (add-lib 'seancorfield/next.jdbc {:mvn/version "RELEASE"})
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See  for further details.
Downloading: seancorfield/next.jdbc/maven-metadata.xml from 
true

👍 4
seancorfield20:02:55

You could add a new alias that combines all of that -- you'll need , instead of whitespace in the -e option if you put it in deps.edn tho'.