Fork me on GitHub

Hi, I try to build a compiled uberjar application using I follow the 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


Did you call the prep function as shown in the examples?


Yes, I followed the steps.


I would look in ./classes to see if config.edn is in there


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?


I just noticed that ./classes is not created by the process, but by Seans -X:uberjar which works btw. This means that I don't have a ./classes folder in the process.


Sorry, target/classes is likely correct there for


There is a #tools-build channel maybe this should move to