Fork me on GitHub
#tools-deps
<
2019-11-06
>
Michaël Salihi14:11:55

Hello everybody, I would to know if I can kick off a one command line simple http server with Clojure like Python does python3 -m http.server ? With tools.deps for eg. ? clj -Sdeps '{:deps {some/clojars {:mvn/version "x.x.x"}}}' -m http.server

dominicm15:11:40

I think there was a snippet for that kicking around

rickmoynihan17:11:24

@dominicm: I’m currently using the capsule builder for pack.alpha, but running into annoyances it brings wrt the JVM trampoline, tunnelling args and also wanting to extend the classpath of the “uber.jar” from the outside via java -cp uber.jar:./my-file ,,,. Is the one-jar builder likely to cause me less friction?

rickmoynihan17:11:29

their docs describe the problem, but not really their solution other than as a custom classloader that redirects requests.

dominicm18:11:05

Haven't used either in this way.

dominicm18:11:44

OneJAR will likely work well for this case, based on my recollection of its function. It'll delegate.

👍 4