Closed behrica closed 10 years ago
Maybe we should default the proxy information, in the same way leiningen does
I thought about it already. I'll try
As I had the proxy values passing already working, I left it in. But if no proxy parameter is specified, then it reads it via the method from leiningen.core.classpath path as you suggested.
So the function where the proxy config is the really used looks like this:
(defn resolve-dependencies
[still dependencies repositories proxy]
(classlojure/eval-in
(:alembic-classloader @still)
`(do
(require '[leiningen.core.classpath :as ~'cp])
(mapv
(fn [dep#]
(letfn [(apath# [^java.io.File f#] (.getAbsolutePath f#))]
{:coords dep#
:jar (-> dep# meta :file apath#)}))
(keys
(aether/resolve-dependencies
:coordinates '~(vec dependencies)
:repositories ~repositories
:proxy '~(or proxy (cp/get-proxy-settings) )))))))
What do you think ?
I made as well a version which always uses the environment variables without a way to override the proxy configuration via function parameters. It's less code changes, so simpler.
Let me know, which version you prefer and I send a new pull request.
I think I would favour having the default picked up from the environment, and still being able to explicitly overide.
OK. The pull request is updated.
Fixed in 8ced4ed
I am behind a corporate proxy, so the "distill" method does not manage to download dependencies.
I looked at the code, the aether/resolve-dependencies you use allows to specify a proxy. So it just need to be passds through.
If I find some time I will fix it and send you a pull request