This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-10
Channels
- # admin-announcements (1)
- # aleph (1)
- # asami (9)
- # babashka (30)
- # beginners (83)
- # calva (8)
- # cherry (4)
- # cider (4)
- # clj-kondo (15)
- # cljs-dev (11)
- # cljsrn (8)
- # clojure (85)
- # clojure-europe (87)
- # clojure-losangeles (9)
- # clojure-nl (4)
- # clojure-norway (4)
- # clojure-spec (3)
- # clojurescript (12)
- # community-development (5)
- # conjure (1)
- # core-typed (3)
- # datomic (21)
- # docker (13)
- # emacs (13)
- # funcool (1)
- # google-cloud (1)
- # graalvm (12)
- # gratitude (14)
- # holy-lambda (6)
- # introduce-yourself (18)
- # lsp (15)
- # malli (6)
- # matcher-combinators (15)
- # nbb (15)
- # off-topic (37)
- # pathom (31)
- # portal (23)
- # rdf (3)
- # releases (2)
- # reveal (2)
- # sci (4)
- # scittle (3)
- # shadow-cljs (14)
- # squint (2)
- # tools-deps (29)
How can I point tools.deps
at a different Maven settings.xml
? I know it obeys the properties in ~/.m2/settings.xml
, but for various reasons I can't use that default path (`${HOME}/.m2/settings.xml`), I need to have my settings file elsewhere. The Internet talks a lot about M2_HOME
, but mostly that talk is along the lines of "It's deprecated and causes all sorts of issues, don't use it", and I don't know if tools.deps
obeys it anyway
You can do the following, slightly different hack: https://github.com/bevuta/clojure-nix-locker/blob/master/utils.nix#L7-L8
and then have .m2/...
in that alternative "home directory"
I do not know how deprecated/evil this is, I just know it works 😄 Join me in Hyrum's Law-ing it into part of the API
Hmm. Can have a go and see if that'll work. Bazel really doesn't like you exposing env vars, but I might be able to set the tool option. Then again, telling it the entirety of it's user.home
is somewhere else, rather than just Maven settings, might cause other issues...
ah, you're using bazel, neat
yes, beating tools.deps into shape for use in hermetic build systems is quite a piece of work 😄
https://imgs.xkcd.com/comics/software_development_2x.png this is how it feels to use tools.deps from Nix (and probably bazel too) 😄
If you need to set a jvm property on the process that builds the classpath, you can do that by setting env var CLJ_JVM_OPTS
(this is preferable to setting JAVA_TOOL_OPTIONS
which applies to the user program as well, and also won't spam your stderr)
You can do the following, slightly different hack: https://github.com/bevuta/clojure-nix-locker/blob/master/utils.nix#L7-L8
Can I exclude "files" (not dependencies) during an uberjar creation ?
I have a case were I get an issue because, I get to files copied to 'META-INF", namely
mailcap
and mailcap.default
Removing one manually from the jar solves it.
It seems hat this option:
:exclude - coll of string patterns (regex) to exclude from deps
is for excludings deps only.
no, it's for paths
"Use :exclude to exclude specific paths from the expanded deps."
(also, #C02B5GHQWP4 exists for tools.build questions)
Thanks. The docu use different wording in 2 places
Maybe the Clojuredoc of uber
could be clarified to make it clear that the exclusion is about paths.
Hey, I am building some uberjar with some dependencies coming from a private artifactory. Building the jar gives me
Execution error (HttpResponseException) at org.eclipse.aether.transport.http.HttpTransporter/handleStatus (HttpTransporter.java:472).
status code: 409, reason phrase: Conflict (409)
and further down in the error report
22 {:type org.eclipse.aether.resolution.ArtifactDescriptorException,
23 :message
24 "Failed to read artifact descriptor for io.confluent:kafka-avro-serializer:jar:5.3.2",
25 :at
26 [org.apache.maven.repository.internal.DefaultArtifactDescriptorReader
27 loadPom
28 "DefaultArtifactDescriptorReader.java"
29 255]}
I build the same jar with lein
just fine. Is tools.deps doing some stricter checking regarding snapshots and releases as this seemed to be a common problem while googling this issue?So the same thing happens when try to get a repl via clj
and it works fine with lein repl
can you provide something more to reproduce? I don't have enough info to comment
not doing anything special wrt snapshots
or could you provide more of the exception trace?
I've been having a similar problem -- a tools-deps project can't locate a dependency that my lein projects find fine. I've even used Datomic's bin/maven-install, and I can see that the dependency is available in my local .m2 Clojure CLI version 1.11.1.1200
Can you share your deps.edn
sorry, let me fix that.. I had reverted to a version of datomic that didn't encounter this issue
Thanks. The docu use different wording in 2 places
Maybe the Clojuredoc of uber
could be clarified to make it clear that the exclusion is about paths.