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.

1232 questions
178
votes
8 answers

How to reload a clojure file in REPL

What is the preferred way of reloading functions defined in a Clojure file without having to restart the REPL. Right now, in order to use the updated file I have to: edit src/foo/bar.clj close the REPL open the REPL (load-file…
pkaleta
  • 1,999
  • 2
  • 12
  • 9
118
votes
11 answers

leiningen - how to add dependencies for local jars?

I want to use leiningen to build and develop my clojure project. Is there a way to modify project.clj to tell it to pick some jars from local directories? I have some proprietary jars that cannot be uploaded to public repos. Also, can leiningen be…
signalseeker
  • 3,950
  • 6
  • 28
  • 36
56
votes
8 answers

Resources in Clojure applications

I am using Leiningen in my Clojure project (a GUI application) and created a "resources" directory under the project root to hold images that my app uses. When I am running my app locally during testing, I fetch the images using the relative path…
Kevin Albrecht
  • 6,784
  • 7
  • 42
  • 56
51
votes
4 answers

What's the difference between Cake and Leiningen?

What's the difference between Cake and Leiningen?
Michiel de Mare
  • 40,513
  • 27
  • 100
  • 132
48
votes
1 answer

JVM options using Leiningen

How do I set JVM options like -server when I launch Clojure using Leiningen?
2daaa
  • 2,499
  • 4
  • 29
  • 42
47
votes
2 answers

Best practices in building and deploying Clojure applications: good tutorials?

I am new to Clojure, and am beginning to experiment with building an application. So far, everything I've seen about tutorials on compiling Clojure programs involves interactivity. For example, "load up the REPL and type (load-file…
kes
  • 5,513
  • 8
  • 39
  • 69
45
votes
2 answers

Any way to add dependency to lein project without REPL restart?

What I do now is open project.clj, add dependency there, run lein deps restart repl, then use, require and so on. The thing is that I don't really like to restart repl because the startup time is slow and I have to reload my files again. So is there…
LoveProgramming
  • 1,973
  • 3
  • 15
  • 22
44
votes
3 answers

Java and Clojure with Leiningen

Is it possible to easily manage and compile native Java classes alongside Clojure in a project using leiningen? I am working at a pretty low level (with netty nio) and thinking that some of the plumbing classes would actually be easier to handle as…
Toby Hede
  • 35,582
  • 27
  • 127
  • 161
43
votes
4 answers

How to upgrade nrepl version of leiningen?

I'm using leiningen and emacs + cider for clojure development. A few days ago, after I upgrade cider through emacs package manager, I'm getting the following warning message when I run M-x cider-connect or M-x cider-jack-in. ; CIDER 0.9.0snapshot…
ntalbs
  • 24,984
  • 7
  • 57
  • 76
38
votes
3 answers

Run tests from Clojure Repl and Leiningen

As a newbie to clojure, I have used leiningen to create a sample project with lein new app first-project which gave me this directory . ├── doc │   └── intro.md ├── LICENSE ├── project.clj ├── README.md ├── resources ├── src │   └──…
anotherCode245
  • 673
  • 1
  • 7
  • 19
38
votes
4 answers

How to run .clj file as a script using leningen?

This is the second question after Is there a standalone Clojure package within Leiningen? For example, I have a file hello_world.clj, and I can run it using java -cp clojure.jar clojure.main hello_world.clj. Since lein already contains Clojure…
Hanfei Sun
  • 39,245
  • 33
  • 107
  • 208
36
votes
4 answers

clojure and leiningen - using a git repository as dependency

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…
Toby Hede
  • 35,582
  • 27
  • 127
  • 161
36
votes
1 answer

No :main namespace specified in project.clj

I just started Web Development with Clojure but I am stuck with a real simple problem. I have :main myapp.core/foo in the project.clj (defproject myapp "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" …
Zeynel
  • 11,497
  • 27
  • 89
  • 138
30
votes
1 answer

what does ^:skip-aot mean in clojure project.clj

I am new to clojure, when I use lein new app I saw this line :main ^:skip-aot my-stuff.core What does ^:skip-aot mean? In which section of clojure document could I find the description?
sleetdrop
  • 425
  • 4
  • 9
29
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,532
  • 1
  • 20
  • 24
1
2 3
82 83