Reputation: 11
I would like to change my whole grails work directory from
c:\documents and settings\%username%\.grails
So I configured a BuildConfig.groovy file, containing
grails.work.dir="workdir"
This creates a folder relative to the project folder and everything is quite fine, except the file "ProxySettings.groovy", which is needed by this project, still has to be placed in the user directory. I've searched many websites for many hours and found some interesting settings, like these in the grails doc, but could not find something that would work.
By now, the file "ProxySettings.groovy" is the last remaining configuration file in the user folder.
Has anyone managed to change this location yet? If so, how?
Best regards!
Upvotes: 1
Views: 2259
Reputation: 106
I was trying to solve this myself in Grails 1.3.7 and couldn't find a variable. The code that loads ProxyConfig.groovy is in $GRAILS_HOME/scripts/GrailsProxy.groovy and looks like this:
def scriptFile = new File("${userHome}/.grails/scripts/ProxyConfig.groovy")
if (!scriptFile.exists()) {
return
So I guess one option for this would be to manually modify that script to read a property that you set in your BuildConfig, though obviously that's far from optimal.
As that file points out, Ant 1.7.1 will automatically use system properties for proxy info, so I've added the following to my BuildConfig.groovy:
System.properties.putAll([
"http.proxyHost": "myproxy.hostname.com",
"http.proxyPort": "8080",
"http.proxyUserName": "myUser",
"http.proxyPassword": "myPass"
])
And it works for me.
Upvotes: 2