Fork me on GitHub
Caro A14:11:58

Hi, I'm trying to get up and running with Cursive behind a corporate proxy. I have leiningen, clojure, jdk all installed and can happily run my project from the commandine. However, when I try to load the project in intellij, cursive tries to download a standalone binary for Leiningen, which is forbidden by the proxy. Is there a way to get cursive to recognise the lein binary of the same version that I have installed? I'm on Linux, javac 11.0.3 from openjdk, lein 1.9.2, intellij 2019.3 and cursive 1.9.1-2019.3 if that makes any difference. Thanks!


Cursive will download the leiningen uberjar to ~/.lein/self-installs, which is where lein itself will download it to. Check which versions you have there, if you have a specific version in that folder then you can tell Cursive to use that version at Preferences | Build, Execution, Deployment | Build Tools | Leiningen

Caro A10:11:21

I don't have anything in .lein/self-installs, but I have what seems to be a lein binary at /usr/local/bin/lein. I didn't do the setup, but I can only assume this is from an operating system package rather than curling some script to install lein. Is there a way to get cursive to look on $PATH for lein, or to use this specific location for the binary?


Lein is two parts - it’s an uberjar containing the actual lein code, and a script which handles downloading the uberjar and running it. That’s what /usr/local/bin/lein is. In the script, there’s probably a line like:

Do you have LEIN_HOME set to something other than ~/.lein?