Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created February 22, 2012 12:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdabir/1884839 to your computer and use it in GitHub Desktop.
Save kdabir/1884839 to your computer and use it in GitHub Desktop.
Setting proxy in groovy
println System.properties.grep ({it.key.contains("proxy")})
// print all system properties
// System.properties.each {k,v-> println "$k=$v"}
// 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