Merge pull request #709 from oliyh/master

Issue #706 - adding non-proxy-hosts
This commit is contained in:
Michael Klishin 2012-07-31 04:44:28 -07:00
commit f4cfb8bb5d
2 changed files with 6 additions and 4 deletions

View file

@ -107,9 +107,10 @@
(:debug project)))})
~@(when (and native-arch-path (.exists native-arch-path))
[(d-property [:java.library.path native-arch-path])])
~@(when-let [{:keys [host port]} (classpath/get-proxy-settings)]
~@(when-let [{:keys [host port non-proxy-hosts]} (classpath/get-proxy-settings)]
[(d-property [:http.proxyHost host])
(d-property [:http.proxyPort port])]))))
(d-property [:http.proxyPort port])
(d-property [:http.nonProxyHosts non-proxy-hosts])]))))
(defn- pump [reader out]
(let [buffer (make-array Character/TYPE 1000)]

View file

@ -142,9 +142,10 @@ or by executing \"lein upgrade\". ")
(defn- http-settings []
"Set Java system properties controlling HTTP request behavior."
(System/setProperty "aether.connector.userAgent" (user-agent))
(when-let [{:keys [host port]} (classpath/get-proxy-settings)]
(when-let [{:keys [host port non-proxy-hosts]} (classpath/get-proxy-settings)]
(System/setProperty "http.proxyHost" host)
(System/setProperty "http.proxyPort" (str port))))
(System/setProperty "http.proxyPort" (str port))
(when non-proxy-hosts (System/setProperty "http.nonProxyHosts" non-proxy-hosts))))
(defn -main
"Run a task or comma-separated list of tasks."