This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-06
Channels
- # babashka (31)
- # beginners (108)
- # calva (6)
- # clj-kondo (62)
- # cljsrn (5)
- # clojure (29)
- # clojure-australia (2)
- # clojure-europe (17)
- # clojure-nl (2)
- # clojure-spec (5)
- # clojure-uk (7)
- # clojurescript (25)
- # code-reviews (1)
- # datomic (13)
- # deps-new (7)
- # editors (1)
- # emacs (31)
- # figwheel-main (3)
- # garden (4)
- # graalvm (18)
- # helix (10)
- # improve-getting-started (12)
- # jobs (3)
- # lsp (20)
- # malli (12)
- # off-topic (7)
- # polylith (30)
- # re-frame (10)
- # remote-jobs (2)
- # shadow-cljs (18)
- # spacemacs (5)
- # sql (11)
- # tools-deps (10)
- # vim (9)
- # xtdb (1)
Hi, I try to build a compiled uberjar application using tools.build
.
I follow the https://clojure.org/guides/tools_build
and end up with this error message at clj -T:build uber
step:
Execution error (IllegalArgumentException) at repliclj.conf/get-config (conf.clj:12).
Cannot open <nil> as a Reader.
which points to the line:
(get-config (io/resource "config.edn"))
The config.edn
file is in the directory resources. I guess
(b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir})
copies the file to target/classes/
where io/resource
don't find it.
Any advice is very welcome.io/resource should find it fine classes, assuming ./classes/ is on the classpath, which is how things have to be setup for aot compilation anyway
If it is in there, it means something is wrong with compiling and ./classes is not on the classpath like if needs to be, if it isn't in there it means resources/ was not properly copied
config.edn
is not in ./classes
but in ./target/classes/
. The guide gives (def class-dir "target/classes")
So, what can I do to ensure that the file is properly copied?