This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-05
Channels
- # announcements (2)
- # beginners (44)
- # calva (7)
- # cider (8)
- # cljs-dev (2)
- # clojure (131)
- # clojure-serbia (2)
- # clojure-spec (3)
- # clojure-uk (56)
- # clojurescript (27)
- # cursive (7)
- # datomic (6)
- # fulcro (25)
- # jobs (3)
- # klipse (3)
- # leiningen (2)
- # off-topic (8)
- # overtone (2)
- # pathom (2)
- # portkey (2)
- # re-frame (2)
- # reagent (10)
- # shadow-cljs (44)
- # spacemacs (1)
- # tools-deps (6)
- # uncomplicate (2)
I tried to read the Leiningen documentation regarding profiles but I'm still a bit puzzled. If I build a jar with command lein with-profile +myprofile ring uberjar ... and then run the jar with command: java -jar target/uberjar/myserver-1.0-standalone.jar ... everything works just fine - application finds the environmental variables defined in file profiles.clj / :myprofile section. But if I move the jar file from the project/target directory somewhere else (e.g. /tmp) and try to start the application in that directory: java -jar myserver-1.0-standalone.jar => the application doesn't find the environmental variables. I somehow assumed that when you build the uberjar with a specific profile, then that profile will be available. What did I miss? My Leiningen version: Leiningen 2.8.3 on Java 11.0.1 OpenJDK 64-Bit Server VM
Ok. I think I got it. There is this .lein-env file that apparently gets generated when building the jar.