This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-31
Channels
- # announcements (6)
- # babashka (40)
- # beginners (6)
- # calva (1)
- # cider (1)
- # clerk (43)
- # clj-kondo (3)
- # clojure (93)
- # clojure-denver (8)
- # clojure-europe (52)
- # clojure-norway (20)
- # clojure-sweden (7)
- # community-development (5)
- # datascript (15)
- # datomic (30)
- # emacs (24)
- # events (15)
- # fulcro (23)
- # graalvm (12)
- # gratitude (1)
- # helix (4)
- # honeysql (4)
- # hoplon (39)
- # hyperfiddle (7)
- # introduce-yourself (1)
- # jobs (1)
- # jobs-discuss (26)
- # lambdaisland (3)
- # lsp (6)
- # matcher-combinators (2)
- # matrix (5)
- # meander (39)
- # nrepl (4)
- # nyc (1)
- # off-topic (5)
- # portal (73)
- # practicalli (1)
- # re-frame (2)
- # reitit (22)
- # releases (1)
- # remote-jobs (4)
- # shadow-cljs (5)
- # sql (17)
- # testing (1)
- # tools-deps (15)
tools.deps isn’t pulling foo/bar
from custom-mvn-repo
.
There’s an entry for it in “~/.m2/settings.xml”.
I also specified it in deps.edn
.
{:deps {foo/bar {:mvn/version "0.0.1"}}
...
:mvn/repos {"custom-mvn-repo" {:url " "}}}
But when trying to reference the :a
alias, I still get the below error.
Why isn’t tools.deps
trying to reference my artifact from custom-mvn-repo
?
clj -M:a
Error building classpath. Could not find artifact foo:bar:jar:0.0.1 in central ( )
What is the :a
alias and why do you expect to change the repos that are searched for a basic dep you've specified?
Can you just share the full deps.edn?
@U04V70XH6 Thanks for the response.
:a
is just an alias that starts an nrepl. Sorry, that nomenclature just confuses the issue.
Ultimately tools.deps doesn’t seem to search additional repos in :mvn/repos
. And I’m unclear on why.
https://clojure.org/reference/deps_and_cli#_maven
It does search them
You really need to share more explicitly what you’re doing so we can help
@U064X3EF3 Because it’s a work repo, I technically can’t share that code. If it were OSS, I definitely would. Apologies. But I hear you. Let me try putting together a test repo ☝️:skin-tone-5:
One thing you might try is generating a pom.xml with -Spom and see whether that looks right, then trying mvn dependency:tree
Good suggestion. I get this…
clj -Spom
Error building classpath. Could not find artifact foo:bar:jar:0.0.1-ace77e745-SNAPSHOT in central ( )
… “central” is specified in a custom ~/.m2/settings.xml
.
That’s where I also tried to add my “custom-mvn-repo” (https://custom.maven.archive2/groups/public/).
The error messages can be misleading here - if an an artifact is not found in any repo, only the first error is reported, which is typically central, but that doesn’t mean your other ones weren’t searched
But I notice this is a snapshot - are you sure the repo you’re adding is a snapshot repo?
Depending what kind of repo this is, you might also be able to look in that url at the desired path to verify it actually exists there
“but that doesn’t mean your other ones weren’t searched” Ah ha! “you might also be able to look in that url at the desired path to verify it actually exists there” Spot on… It turns out that my Or g is migrating to a new Maven repository. So I need to update my settings.xml, and possibly a registration. So just going through that right now. Really appreciate the feedback 👏:skin-tone-5: