leiningen

ExceptionInInitializerError when using leiningen

会有一股神秘感。 提交于 2019-11-30 23:04:16
I'm a beginner getting started with using Clojure and Leiningen, and I've run into a problem trying to use a variety of lein commands. Although $ lein deps works fine, when I tried to use $ lein plugin install <plugin> , or even $lein help , I get the stack trace pasted below. I would guess that this is a setup issue, but I'm having trouble finding information online or finding the right place to start looking. When installing lein I followed the instructions on the Leiningen GitHub page . Exception in thread "main" java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:0) at clojure.lang

Uninstall/Reinstall leiningen(clojure server) related issues

删除回忆录丶 提交于 2019-11-30 22:44:01
问题 As I asked and answered here, I found that running ' sudo lein deps causes some problem that forces me to run ' sudo lein swank', which is annoying. And I was told not to use sudo. I use Mac OS X 10.6.4. So, I'll try to uninstall and reinstall leiningen. Uninstalling leiningen Removing ~/.m2 directory is just uninstall, is this correct? (Re)installing leiningen I followed the steps explained here. copy the 'lein' to ~/bin/lein and make it runnable. Run 'lein self-install', and I see ~/.m2

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

ぃ、小莉子 提交于 2019-11-30 19:54:53
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) then it works correctly :S Try lein trampoline run , it works. The following is from leiningen FAQ: Q: I

how to load ns by default when starting repl

萝らか妹 提交于 2019-11-30 18:05:32
I am using lein2. I would like to load some ns by default when the repl starts. Is it possible to either specify in project.clj the ns that should be loaded, when lein2 repl is executed for that project? You will find a lot of answers in the sample project ;; Options to change the way the REPL behaves :repl-options {;; Specify the string to print when prompting for input. ;; defaults to something like (fn [ns] (str *ns* "=> ")) :prompt (fn [ns] (str "your command for <" ns ">, master? " )) ;; Specify the ns to start the REPL in (overrides :main in ;; this case only) :init-ns foo.bar ;; This

ExceptionInInitializerError when using leiningen

拈花ヽ惹草 提交于 2019-11-30 17:53:34
问题 I'm a beginner getting started with using Clojure and Leiningen, and I've run into a problem trying to use a variety of lein commands. Although $ lein deps works fine, when I tried to use $ lein plugin install <plugin> , or even $lein help , I get the stack trace pasted below. I would guess that this is a setup issue, but I'm having trouble finding information online or finding the right place to start looking. When installing lein I followed the instructions on the Leiningen GitHub page.

Clojure (read-line) doesn't wait for input

旧时模样 提交于 2019-11-30 17:14:10
问题 I am writing a text game in Clojure. I want the player to type lines at the console, and the game to respond on a line-by-line basis. Research showed me that (read-line) is the way one is meant to get text lines from standard input in Clojure, but it is not working for me. I am in a fresh Leiningen project, and I have added a :main clause to the project.clj pointing to the only source file: (ns textgame.core) (defn -main [& args] (println "Entering -main") ; (flush) ;makes no difference if

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

£可爱£侵袭症+ 提交于 2019-11-30 07:21:10
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 most up-to-date one I could. I've been following this guide from December of 2010 and it's very similar to

Dependencies in maven local repositories with leiningen

天涯浪子 提交于 2019-11-30 05:20:41
I am starting lein new project in clojure and want to use the goose article extraction library. Unfortunately I couldn't find the jar of that library on any publicly available maven repository, so I set out to add it to a local maven repository. In the project directory, I copied the goose jar and its pom.xml files and did mkdir maven-repo mvn install:install-file -Dfile=goose-2.1.6.jar -DartifactId=goose -Dversion=2.1.6 \ -DgroupId=local -Dpackaging=jar -DlocalRepositoryPath=maven-repo -DpomFile=pom.xml And added the following to project.clj :repositories {"local" ~(str (.toURI (java.io.File.

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

ぃ、小莉子 提交于 2019-11-30 04:53:54
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 on each commit. Instead, we want it to be incremented automatically whenever a new build is triggered

What is an elegant way to set up a leiningen project that requires different dependencies based on the build platform?

我的梦境 提交于 2019-11-30 03:44:21
In order to do some multi-platform GUI development, I have just switched from GTK + Clojure (because it looks like the Java bindings for GTK never got ported to Windows) to SWT + Clojure. So far, so good in that I have gotten an uberjar built for Linux. The catch, though, is that I want to build an uberjar for Windows and I am trying to figure out a clean way to manage the project.clj file. At first, I thought I would set the classpath to point to the SWT libraries and then build the uberjar. This would require that I set a classpath to the SWT libraries before running the jar, but I would