This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-23
Channels
- # announcements (2)
- # babashka (25)
- # beginners (33)
- # biff (13)
- # calva (13)
- # clerk (82)
- # clj-commons (3)
- # clj-kondo (8)
- # clj-on-windows (23)
- # cljdoc (6)
- # clojure (16)
- # clojure-belgium (1)
- # clojure-dev (58)
- # clojure-europe (53)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-uk (2)
- # clojurescript (17)
- # core-async (5)
- # cursive (6)
- # datahike (1)
- # datomic (8)
- # emacs (25)
- # etaoin (21)
- # events (4)
- # graalvm (33)
- # honeysql (7)
- # hyperfiddle (1)
- # lsp (49)
- # luminus (4)
- # malli (18)
- # off-topic (63)
- # reagent (11)
- # releases (1)
- # shadow-cljs (200)
- # timbre (1)
- # tools-build (17)
I want to exclude the shadow-cljs build folder from my uberjar. The path is resources/public/js/cljs-runtime. I've tried this but it still adds all the files:
(b/uber {:class-dir class-dir
:uber-file uber-file
:basis basis
:main 'doublethedonation.core
:exclude ["LICENSE" "public/js/cljs-runtime/*"]})
this is a regex string, not a glob
"public/js/cljs-runtime/.*"
maybe?
I tried just not copying the folder instead,
(b/copy-dir {:src-dirs ["src-clj" "src-cljs" "src-cljc" "resources"]
:target-dir class-dir
:ignores ["public/js/cljs-runtime/.*"]})
yeah, that's more for excluding things like editor backup files
cool, deleting the path directly after copying works too
(b/delete {:path "target/classes/public/js/cljs-runtime"})
When building my uberjar, I’m getting
Execution error (ExceptionInfo) at clojure.tools.build.tasks.uber/explode1 (uber.clj:164).
Cannot write META-INF/license/LICENSE.aix-netbsd.txt from io.grpc/grpc-netty-shaded as parent dir is a file from another lib. One of them must be excluded.
What is an easy way to discover where the conflict is coming from? Once I do, how would I fix this problem?
This is for an internal service, so I don’t really need to include the license files. How would I ignore this error?https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-uber - add :exclude ["META-INF/license/LICENSE.aix-netbsd.txt"]
to your uber invocation
Got it. Thanks
fwiw, it was a little confusing which “exclusions” the message refers to. I thought it was talking about classpath exclusions specified in deps.edn
. Of course, on a little reflection, it makes sense that it’s talking about the uber
task
the source is likely many libs that have a file META-INF/license that conflicts with the META-INF/license/ dir in io.grpc/grpc-netty-shaded
Yeah, I figured as much. Thanks for the pointer
@alexmiller i remember a while back you mentioned you might switch tools.build to pull directly from jars rather than exploding them onto disk. This change would alleviate this issue above. Do you know if that is still on the roadmap?
still an option to consider, but not something I'm likely to look at imminently