How To Configure Leiningen to Use An HTTP Proxy

I spent a couple of hours banging my head against a wall over this.  Leiningen doesn’t respect the HTTP_PROXY environment variable as most Unix programs do.  I finally asked on the Clojure IRC channel and got the answer from manutter: leiningen, of course, uses maven for its dependency management.  Maven, in turn, doesn’t respect the environment variable.  Instead you need to configure a specific file in your ~/.m2 directory.

Hope this helps someone.

Technorati Tags: ,

Published by

Julian Birch

Full time dad, does a bit of coding on the side.

One thought on “How To Configure Leiningen to Use An HTTP Proxy”

  1. That's perfect. I believe lein2 uses pomegranate, which respects the standard environment variables, rather than maven, which not only doesn't respect HTTP_PROXY, it doesn't even respect any reasonable sense of taste.


Leave a Reply

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

You are commenting using your 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