Skip to content
Newer
Older
100644 36 lines (28 sloc) 688 Bytes
e168c95 @graemerocher fix for GRAILS-6271 "Improve support for proxies, with multiple named…
graemerocher authored Jun 8, 2010
1
2 /**
3 * @author Graeme Rocher
4 * @since 1.2.3
5 */
6
7 includeTargets << grailsScript("_GrailsArgParsing")
8 target(default:"Removes a proxy configuration") {
9 depends(parseArguments)
10
11
12 if(!argsMap.params) {
13 println msg()
14 exit 1
15 }
16 else {
17 def settingsFile = grailsSettings.proxySettingsFile
18 config = grailsSettings.proxySettings
19 def name = argsMap.params[0]
20 config.remove(name)
21
22 settingsFile.withWriter { w ->
23 config.writeTo(w)
24 }
25
26 println "Removed proxy configuration [${name}]."
27 }
28 }
29
30 String msg() {
31 return '''\
32 Usage: grails remove-proxy [name]
33 Example: grails remove-proxy client
34 '''
35 }
Something went wrong with that request. Please try again.