Grails Dependency Management – Setting the Ivy Proxy
June 18, 2010 – 11:07 amWhen dealing with corporate firewalls and proxy servers, dependency management can be a pain. With Grails 1.3.1 I recently encountered an issue resolving dependencies that were not in a maven central repository. I had already done ‘grails set-proxy’ and that seemed to do the trick for the majority of the dependencies I needed, but these few turned out to be very elusive.
After some quick searching, I stumbled across a way to set the Ivy proxy through the ANT_OPTS environment variable. That didn’t do the trick, but passing those parameters to grails directly DID.
If you’re running Grails from the command line, you can do the following:
grails -Dhttp.proxyHost=your.proxyserver.com -Dhttp.proxyPort=80 clean
If you’re using Hudson (as I was), you can add two additional lines into the “Properties” box of your “Build with Grails” configuration
http.proxyHost=your.proxyserver.com
http.proxyPort=80 clean

One Response to “Grails Dependency Management – Setting the Ivy Proxy”
This is fixed in Grails 1.3.2. Also, extra commands were added to make it easy to enable and disable the proxy: add-proxy, remove-proxy, and clear-proxy. The first two deal with named proxy settings (so you can have multiple proxies configured), as does set-proxy now:
grails set-proxy work
By Peter Ledbrook on Jun 21, 2010