[英]How to check proxy settings in Leiningen ? (Clojure)
I want to check if Windows ENV variable http_proxy
is picked properly by Leiningen. 我想检查Leiningen是否正确选择了Windows ENV变量
http_proxy
。 I've found a function get-proxy-settings
but can't understand how to call it properly. 我找到了一个函数
get-proxy-settings
但无法理解如何正确调用它。 Seems I have to use namespace leiningen.core.classpath
somehow for this? 似乎我必须以某种方式使用命名空间
leiningen.core.classpath
吗? This is my second day to learn Clojure and I am not familiar with namespaces yet. 这是我学习Clojure的第二天,我还不熟悉命名空间。
Just try your proxy settings in your environment and see if it works. 只需在您的环境中尝试代理设置,看看它是否有效。 It should work automatically.
它应该自动工作。
But if you must, you can call leiningen.core.classpath/get-proxy-settings
from your project definition by using unquote. 但如果必须,可以使用unquote从项目定义中调用
leiningen.core.classpath/get-proxy-settings
。 Minimal example: 最小的例子:
(defproject proxy-settings "0.1-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]]
:plugins [[lein-pprint "1.1.2"]]
:debug/proxy ~(leiningen.core.classpath/get-proxy-settings))
Note the lein-pprint
plugin there. 注意那里的
lein-pprint
插件。
Use lein pprint
to see the value of :debug/proxy
. 使用
lein pprint
查看:debug/proxy
的值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.