Opening an URL with a proxy
Set proxy config.
System.properties.putAll( ["http.proxyHost":"proxy-host", "http.proxyPort":"proxy-port"] )
def url = 'http://www.google.com/images/logo.gif'
def file = new FileOutputStream(address.tokenize("/")[-1])
def out = new BufferedOutputStream(file)
out << new URL(address).openStream()
out.close()
Change proxy-host and proxy-port to your lokal proxy server.