leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
michaelb 2020-05-06T18:19:28.102300Z

I have :profiles {:uberjar {:aot :all}}, which is what I want, but after compilation is finished I need javafx.application.Platform/exit to be called

michaelb 2020-05-06T18:19:40.102600Z

not sure how I can accomplish that

byrongibby 2020-05-06T20:14:47.105300Z

Hi. I am a little confused about how I should refer to resources in my project. Should it be (slurp "foo.txt") or (slurp "resources/foo.txt") ? I am thinking it it should be the former, but I get FileNotFoundException when running lein ring uberwar?

alexmiller 2020-05-06T20:20:18.107300Z

neither - when loading from a file that ends up on the classpath, you should load it as a resource

1👍
byrongibby 2020-05-06T20:20:57.107800Z

Excuse my ignorance, but how do I do that?

alexmiller 2020-05-06T20:21:55.108200Z

(slurp (<http://clojure.java.io/resource|clojure.java.io/resource> "foo.txt")) 

alexmiller 2020-05-06T20:22:00.108400Z

should work I believe

alexmiller 2020-05-06T20:22:34.109100Z

the path will be relative to whatever directory is included in the war, probably your resources/ directory

byrongibby 2020-05-06T20:23:09.110100Z

I see, thank you very much for the help!

alexmiller 2020-05-06T20:23:11.110300Z

this will work either from the file system (where the resource directory is on the classpath) or the uberwar (where the directory is inside the war)