leiningen

'lein jar' and 'lein uberjar' not setting the main-class properly

Hi, I ran lein uberjar on my project and it created the corresponding jar files. When I run the jar a ClassNotFoundException: explodingdots.core is thrown. I specified explodingdot.core as my main class. I extracted the jar file and there was indeed no core.class in the corresponding directory. What did I forget? I have the following c...

How do you use a type outside of its own namespace in clojure?

I have a project set up with leiningen called techne. I created a module called scrub with a type in it called Scrub and a function called foo. techne/scrub.clj: (ns techne.scrub) (deftype Scrub [state] Object (toString [this] (str "SCRUB: " state))) (defn foo [item] (Scrub. "foo") "bar") techne/scrub_test.clj...

Generating Random Numbers in Incanter

How do I use the random number generators in Parallel Colt from incanter? I've listed these dependencies in my project.clj file: :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [incanter/core "1.2.3"] [incanter/parallelcolt "0.9.4"]] And then I tried...

clojure lein (read-line) stdin woes

So regular clojure repl works fine, (read-line) collects input, then echos it. Using lein repl though, never echoes any input characters, nor does it ever allows me to return from any stdin reading commands. I'm sure it has something to do with rebinding in, but was wondering if there is a workaround/fix? Thanks. ...

What's the difference between Cake and Leiningen?

What's the difference between Cake and Leiningen? ...

Testing in leiningen

I am writing a small Clojure project using leiningen with the following directory structure: project + src + org/example/project/core.clj + test + org/example/project/core.clj When I run lein test, it reports that it ran 0 tests with 0 failures, but I purposely put a test designed to fail in the test/.../core.clj file. I added th...

How can i minimize the AOT compilation in leiningen (Clojure)

When you create a Clojure project with leiningen all the *.clj-files are compiled AOT. Normally the AOT compilation is not necessary and I would like to minimize it. This is necessary for me to raise acceptance of Clojure as a complement in a Java-dominated environment. It is easier to "sell" a single class-file as the glue together wit...