leiningen

How to disable Clojure assertions, including preconditions?

狂风中的少年 提交于 2019-12-05 02:12:47
问题 What are some good ways to disable Clojure assertions (including preconditions and postconditions) in the REPL? For an arbitrary Leiningen profile? 回答1: Per https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L286 Set :global-vars to {*assert* false} in your profiles.clj . You can put the above setting in whatever Leiningen profiles you want. 来源: https://stackoverflow.com/questions/24949418/how-to-disable-clojure-assertions-including-preconditions

Does Leiningen read maven settings in .m2/settings.xml?

牧云@^-^@ 提交于 2019-12-04 19:05:17
问题 I have several additional repositories in ~/.m2/settings.xml . I tried lein search and it doesn't find the packages in my repositories. How can I tell leiningen to search repositories in maven settings? 回答1: You can add the :repositories tag to your project.clj file: (defproject com.foo/bar "1.0.0-SNAPSHOT" ;; ...other configuration... :repositories [["java.net" "http://download.java.net/maven/2"]]) Take a look at the official sample project.clj. You'll have to copy over the repository

How to run the jar made from 'lein jar' command?

 ̄綄美尐妖づ 提交于 2019-12-04 18:16:18
问题 This is a follow-up for this question. After running 'lein jar', I get 'myproject-1.0.0-SNAPSHOT.jar', which doesn't contain the clojure-1.2.0-beta1.jar and clojure-contrib-1.2.0-beta1.jar. And running 'lein uberjar' gives me two jar files. The first one (that ends with -standalone.jar) is the jar contains everything, and the second one is the same as the jar generated with 'lein jar'. This is the question of the jar with the second one. There's no problem running with the first jar, as I

leiningen: missing super-pom

情到浓时终转凉″ 提交于 2019-12-04 17:59:31
问题 if I enable eith the clojure-couchdb or swank-clojure then lein deps fails because org.apache.maven:super-pom:jar:2.0 is missing :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"] [clojure-http-client "1.0.0-SNAPSHOT"] [org.apache.activemq/activemq-core "5.3.0"] ; [org.clojars.the-kenny/clojure-couchdb "0.1.3"] ; [org.clojure/swank-clojure "1.1.0"] ]) this error: Path to dependency: 1) org.apache.maven:super-pom:jar:2.0 2) org.clojure

Leiningen: How to customize the location of the .m2 folder?

筅森魡賤 提交于 2019-12-04 11:09:40
问题 I would like to change the location of the .m2 folder where leiningen stores all dependencies (on Linux). Is it possible to achieve this? I've checked the source code of the lein.sh script and all environment variables but there's nothing which seems to point to $HOME$/.m2 回答1: For leiningen v2: Put a profiles.clj in ./users/name/.lein (or Linux equivalent) containing the following {:user {;Location of local repository :local-repo "Drive/Path" ;Location of locally installed jars ;(that can't

Display complete dependency tree with Leiningen

不问归期 提交于 2019-12-04 08:29:55
问题 I understand that lein deps :tree displays a dependency tree of all the project dependencies (implicit and explicit). However, "each dependency is only shown once within a tree." I'd really like to see a tree where this wasn't the case, and that if libraries A and B require library X , library X shows up under both A and B . Does anyone know how to do this with lein or some other tool? 回答1: You can generate Maven's POM out of Leiningen's project definition and then use Maven's dependency:tree

Getting Leiningen & Cygwin Working

痴心易碎 提交于 2019-12-04 08:08:37
I am trying to get Leiningen and Cygwin working together. One of the problems I think I have is that I have Java installed in "C:\Program Files\Java..." directory. The space appears to be causing issues. When I try to run the lein script in Cygwin, I am getting the following error: ./lein: line 325: C:\Program Files\Java\jdk1.8.0_05\bin\java.exe : command not found Then I thought the issue was the space. So I changed line 325 from: "$LEIN_JAVA_CMD" \ to (for testing purposes): "$'C:\\\Program Files\\\Java\\\jdk1.8.0_05\\\bin\\\java.exe'" \ But, I am still getting this error: ./lein: line 325:

lein ring server with nrepl doesn't honour cider-nrepl

你离开我真会死。 提交于 2019-12-04 07:51:10
When I start up my current project with lein ring server and try to connect to it from Emacs via cider, I get the following warning: ; CIDER 0.8.2 (Java 1.7.0_51, Clojure 1.6.0, nREPL 0.2.6) WARNING: The following required nREPL ops are not supported: apropos classpath complete eldoc info inspect-start inspect-refresh inspect-pop inspect-push inspect-reset macroexpand ns-list ns-vars resource stacktrace toggle-trace-var toggle-trace-ns undef Please, install (or update) cider-nrepl 0.8.2 and restart CIDER user> However, I do have a dependency for [cider/cider-nrepl "0.8.2"] in my project.clj .

Using clojure and leiningen with IDEs

北慕城南 提交于 2019-12-04 07:48:16
问题 I'm looking at switching my projects build from Ant to leiningen and wanted to know if there is a Clojure IDE (intellij, eclipse, netbeans) for which the "build" and "debug" buttons will still work? 回答1: I have had some luck with La Clojure and the "Leiningen" plugin for IntelliJ IDEA. After creating a new project on the command line with lein new , I created a new project in IntelliJ. The Run Configuration Script Path needs to be pointed to the core.clj file, and the Module Settings

Local dependencies in Leiningen without creating a Maven repo?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 04:25:14
I'm building a Compojure web application, and I'd like it to use functions from another Clojure project I wrote. I'm not at all familiar with Maven, and from what I've heard, it has a very steep learning curve. Unfortunately, everything I've seen suggests using a private Maven repo as a dependency and doesn't suggest an alternative. I'd really like to avoid struggling with Maven if possible. Does anyone know of an alternative? I'm currently using the latest version of Leiningen. If the other project is also a lein project, you just need to do a "lein install" and that will take care of