leiningen

Leiningen compilation order?

江枫思渺然 提交于 2019-12-19 19:14:43
问题 I'm just learning how to lein , and I'd like to use from a Java source a class created by deftype in a Clojure source. This wasn't covered in the basic tutorial and I can't get it to work properly. The problem is that Java source can't import Clojure class, since it hasn't been compiled yet. And Clojure class isn't compiled, since compilation is aborted by the Java source. I give a minimal example: Create a new project with: lein new app javafoo Add to project.clj :aot :all :java-source-paths

How to configure leiningen to use newest Clojure version for repl started outside of project?

我是研究僧i 提交于 2019-12-19 06:26:32
问题 When I start clojure repl for specific project, for leiningen is enough to specify correct clojure version in the concrete project.clj file as described here. But when I start repl outside the project then the older version is started. In my case the older version is 1.5.1 and I want to upgrade to 1.6.0 . Here has proposed not working solution, but in the comments bellow is said that in lieingen version 2.1 the problem is resolved. I'm with version 2.3.4 of leiningen but the proposed solution

Why does read-line not return after hitting ENTER (seems like a hang) using lein run, but works with lein repl?

社会主义新天地 提交于 2019-12-19 02:27:28
问题 The problem at hand is that when I run my program with lein run it gets to the (read-line) part and I can't get out of it, meaning: read-line never returns. Here is the relevant code: (def command (atom "")) (defn print-prompt [] (print "prompt> ") (flush) ) (defn ask-for-input [] (print-prompt) (let [x (str (read-line))] (println (str "User input: " x)) (reset! command x) ) ) I never see the "User input: " string on screen. The strange part is, if I run lein repl and call (ask-for-input)

Mac OSX, Emacs 24.2 and nrepl.el not working

南笙酒味 提交于 2019-12-18 13:13:25
问题 I'm using nrepl.el, Emacs 24.2. My S.O version is OS X Lion 10.7.5. Running the command [M-x] nrepl after start a REPL session through lein (:~ $ lein repl) i am able to connect to it but if i try to use [M-x] nrepl-jack-in i get the message bellow: error in process sentinel: Could not start nREPL server: /bin/bash: lein: command not found I installed leiningen using the instructions in the main site and reinstalled it using homebrew with the command brew install leiningen --devel but both

How to install Clojure on Ubuntu 10.04 from Github repo with no clojure.jar

半腔热情 提交于 2019-12-18 12:37:30
问题 I've been trying to install Clojure on my computer to learn and use. I'm running Ubuntu 10.04, and have installed the latest Sun Java SDK and environment from Synaptic. Searching with Google, I found multiple guides that give pretty clear guides on how to go about installing all the dependencies and useful tools and builders like ant, maven, leiningen, and emacs with SLIME. Some of the guides are a bit dated, especially considering how fast Clojure development moves, so I searched for the

How to get runtime access to version number of a running Clojure application?

走远了吗. 提交于 2019-12-18 11:48:01
问题 I have a web service written in Clojure which is continuously delivered. To allow our automated deployment tools to know which version of the codebase has been deployed, the web service should provide a way to query which version it is. The version is declared as part of the project setup in the Leiningen build tool, like this: (defproject my-web-service "1.2-SNAPSHOT" ; ... rest of project.clj ) The codebase is packaged as a JAR file. We developers do not want to increment the version number

clojure and leiningen - using a git repository as dependency

血红的双手。 提交于 2019-12-18 10:19:42
问题 Is it possible to have leiningen pull a project directly from a git repository (on github) as a dependency? Using Bundler with Ruby, it is possible to map a gem to a git repo, allowing for rapid development and integration of dependent projects. Update Based on the accepted answer, there is now a leiningen plugin for managing git-deps: https://github.com/tobyhede/lein-git-deps 回答1: Answer for 2017: Use lein-voom You can use lein-voom to pull and build project dependencies from GitHub or other

How to use leiningen to develop using local jars?

我与影子孤独终老i 提交于 2019-12-18 04:45:11
问题 I realize that this question is pretty much the exact question found here. However, seeing as that question is 1.5 years old (or so), I would like to revisit it. How does one add local dependencies using leiningen? Surely this capability must exist by now? 回答1: Create a private Maven Repository, and then, add the following to your project.clj :repositories {"local" ~(str (.toURI (java.io.File. "your_local_repository")))} 回答2: If the jars are based on your own projects, you can use lein

Using maven's “LATEST” keyword in leiningen project

江枫思渺然 提交于 2019-12-14 03:54:24
问题 I have two leiningen projects. According to this question, maven should allow me to use "LATEST" as a dependency version. It is giving me an error suggesting that the dependency with version "LATEST" can't be found. This answer represents how I'm referencing this project locally with leiningen, if that matters. How do I get this to work? If this isn't how you reference local dependencies in your project, I'm open to alternative suggestions. The project files look like this: (defproject mongo

Where does Leiningen install the clojure libraries?

依然范特西╮ 提交于 2019-12-13 14:17:29
问题 Runnig lein for the first time, it installs clojure, but were to? It does not seem to be in /Library ... ~/Library ... ~/.lein ... Is there an established location for clojure.jar and the contribution jars on Unix/OS X## Heading ##? 回答1: Leiningen uses maven (or, to be more precise, the underlying libs which implement maven), which by default will install all dependencies under $HOME/.m2/ . 回答2: The default path is given by (.getPath (clojure.java.io/file (System/getProperty "user.home") ".m2