Questions tagged [leiningen]

Leiningen is a build automation and dependency management tool for Clojure projects

Leiningen is a project automation tool for Clojure, where you describe your project with Clojure. Leiningen is extensible through plugins and provides functionality to build complex projects and manage dependencies.

1285 questions
32
votes
3 answers

Display complete dependency tree with Leiningen

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…
metasoarous
  • 2,854
  • 1
  • 23
  • 24
29
votes
2 answers

How to use library in maven repo for clojure project?

I use Leiningen to manage my CLJ project. When I want to wrap a Java library, I found that I have to introduce it to my project firstly. How can I use a library in a Maven repo in my project?
qiuxiafei
  • 5,827
  • 5
  • 30
  • 43
28
votes
6 answers

Using clojure and leiningen with IDEs

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?
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
28
votes
6 answers

how do I suppress a inherited projects logback.xml file (2 logback.xml in a single project)?

I have project com.samedhi/base that has a logback.xml file and project com.samedhi/derive that also has a logback.xml file. Project 'derive' has a dependency on 'base'. When I "lein trampoline repl" on 'derive', I get the following…
Stephen Cagle
  • 14,124
  • 16
  • 55
  • 86
27
votes
2 answers

Unable to resolve symbol when running code using Leiningen

I'm using Leiningen (for the first time) to manage an app my writing. So far I've defined the project dependencies, installed the deps in the project lib directory, and I've defined a function. When I run lein repl from the project root and then…
sjac
  • 2,811
  • 5
  • 23
  • 20
27
votes
1 answer

Why is `lein run` not `lein trampoline`?

It seems to me that the only difference between lein run and lein trampoline is that the latter quits Leiningen's JVM to save memory. This seems always a good idea, so why is this feature not included in lein run and then get rid of lein trampoline?
Tyler Gillies
  • 1,857
  • 4
  • 22
  • 31
24
votes
4 answers

Keeping dependency versions up to date in Leiningen projects

Is there a simple way to find out what versions of dependencies are available using Leiningen? E.g., if I have a web app which depends on Hiccup and Compojure, how can I be sure that I'm on the latest version of each without going to the github page…
kittylyst
  • 5,640
  • 2
  • 23
  • 36
24
votes
8 answers

Getting the version of the current clojure project in the repl

Is it possible to grab the project information within the clojure repl? For example, if there was a project defined: (defproject blahproject "0.1.2" ....) When running a repl in the project directory, is there a function like this? >…
zcaudate
  • 13,998
  • 7
  • 64
  • 124
22
votes
2 answers

clojure lein: How do I include source from another directory in my project?

I have a lein project in one directory, and instead of using the .jar that gets downloaded when I run > lein deps I want to use the source from a cloned github repository (It has recent fixes not in the current jar). What is the canonical way to…
prismofeverything
  • 8,799
  • 8
  • 38
  • 53
22
votes
1 answer

What's the difference between Leiningen and Clojure CLI tools and how should I use them?

I'm playing around with Clojure recently. The most loved dependency management tool in the Clojure ecosystem is Leiningen to my knowledge. But I also found Clojure has provided CLI tools which probably could replace Leiningen. Due to the limitation…
Jian
  • 3,118
  • 2
  • 22
  • 36
22
votes
3 answers

How to Reload files upon save when using swank+leiningen+emacs

I'm looking to set up slime+lein-swank to reload source files referenced from the repl when i save the file. currently i do this: edit file save file switch to repl (use :reload-all 'com.package.namespace) test stuff I want to not have to remember…
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
22
votes
3 answers

"Best Practice" for a clojure library that uses native libs?

While this may appear subjective, there is a concrete example that I'd like help resolving. This is related to an issue with the Overtone Clojure library https://github.com/overtone/overtone/issues/274 which seems like there should be a "Best…
Roger Allen
  • 2,262
  • 17
  • 29
22
votes
1 answer

How to get Emacs, nrepl.el and Leiningen to play along?

I was actually quite happy with using vim + lein repl, but since so many people keep saying that Emacs is the way to go when it comes to Lisps, I've decided to give it a try. The problem is now setting up a clojure environment that does all the…
Cubic
  • 14,902
  • 5
  • 47
  • 92
22
votes
1 answer

How can I write a test to handle an expected exception?

How can I test for a function that throws an expected exception? Here is the function that throws the exception: (defn seq-of-maps? "Tests for a sequence of maps, and throws a custom exception if not." [s-o-m] (if-not (seq? s-o-m) (throw…
octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
21
votes
2 answers

How do I find which of my dependencies is downloading a particular jar?

One of my project.clj's :dependencies is dependent on the monolithic clojure-contrib-1.1.0.jar, but I can't guess which one is downloading it. Short of incrementally commenting out each one, how can I discover which of them is responsible ?
Hendekagon
  • 4,565
  • 2
  • 28
  • 43
1
2
3
85 86