leiningen

How can I set up leiningen to work with multiple projects?

我只是一个虾纸丫 提交于 2019-11-27 01:20:56
问题 I have multiple, separate leiningen projects that ostensibly could depend on one-another. Example: ~/projects/mywebapp (my own project) ~/projects/noir (a clone of the github repo) ~/projects/clojureql (a clone of the github repo) I want to have them all compiled into the same JVM at the same time. I would like to run the git repos bleeding edge (pulling new commits/making my own commits) and not have to run lein jar or lein deps and certainly not have to restart the VM if I change any of the

How to reload a clojure file in REPL

江枫思渺然 提交于 2019-11-26 22:28:16
问题 What is the preferred way of reloading functions defined in a Clojure file without having to restart the REPL. Right now, in order to use the updated file I have to: edit src/foo/bar.clj close the REPL open the REPL (load-file "src/foo/bar.clj") (use 'foo.bar) In addition, (use 'foo.bar :reload-all) does not result in required effect, which is evaluating the modified bodies of functions and returning new values, instead of behaving as the source haven't changed at all. Documentation: load

Serving static files with ring/compojure - from a war

醉酒当歌 提交于 2019-11-26 20:55:10
问题 Using ring (and the lein-ring tools) - I am able to serve up static files from "resources" etc as per the docs when running in development - however - when I package things up via lien uberwar I have no idea how to make it serve those files when running in a container. I see conflicting docs on wrap-resource, or setting :resource-path but none seem to work. 回答1: As per Compojure's Getting Started Wiki, put route/resources below your paths: (defroutes main-routes (GET "/" [] "<h1>Hello World

leiningen - how to add dependencies for local jars?

戏子无情 提交于 2019-11-26 12:47:48
I want to use leiningen to build and develop my clojure project. Is there a way to modify project.clj to tell it to pick some jars from local directories? I have some proprietary jars that cannot be uploaded to public repos. Also, can leiningen be used to maintain a "lib" directory for clojure projects? If a bunch of my clojure projects share the same jars, I don't want to maintain a separate copy for each of them. Thanks You could put your private jars in lib/ and they'd be on the classpath for the purposes of lein swank and the like; this does seem to defeat the point of using a dependency

leiningen - how to add dependencies for local jars?

霸气de小男生 提交于 2019-11-26 03:05:21
问题 I want to use leiningen to build and develop my clojure project. Is there a way to modify project.clj to tell it to pick some jars from local directories? I have some proprietary jars that cannot be uploaded to public repos. Also, can leiningen be used to maintain a \"lib\" directory for clojure projects? If a bunch of my clojure projects share the same jars, I don\'t want to maintain a separate copy for each of them. Thanks 回答1: You could put your private jars in lib/ and they'd be on the