The Holy Java

Notes of a passionate Java EE developer

Tip: Import Leiningen Project to IntelliJ (With Dependencies)

Posted by Jakub Holý on October 27, 2012

To import a Leiningen-based project into IntelliJ with the Clojure plugin, the best way seems to be:

  1. Run lein pom to generate a Maven pom.xml from project.clj
  2. Import the project as a Maven project (File – New Project… – Import project from external model – Maven – browse to the directory – …)

Versions: Leiningen 2.0.0-preveiw10, IntelliJ 11. You don’t need the Leiningen plugin for IntelliJ (it seems to be useful only for running the leiningen tasks, which you can well do from the command line).

If you change the dependencies, regenerate the pom.

(Notice that Leiningen 1 did download all the dependencies into ./lib/ when executing lein deps but that doesn’t work anymore in Leiningen 2.)

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: