Created
February 22, 2012 12:36
-
-
Save kdabir/1884839 to your computer and use it in GitHub Desktop.
Setting proxy in groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
println System.properties.grep ({it.key.contains("proxy")}) | |
// print all system properties | |
// System.properties.each {k,v-> println "$k=$v"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set proxy config as system property | |
System.properties.putAll([ | |
'http.proxyHost':'proxy.mycompany.com', | |
'http.proxyPort':'8080' | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment