Skip to content

Instantly share code, notes, and snippets.

@tyama
Created December 25, 2009 04:39
Show Gist options
  • Save tyama/263509 to your computer and use it in GitHub Desktop.
Save tyama/263509 to your computer and use it in GitHub Desktop.
//Events script for the grails app-engine plugin 0.8.5 to support
//system-properties stringchararrayaccessor.disabled=true
import groovy.xml.StreamingMarkupBuilder
import groovy.xml.MarkupBuilder
includeTargets << new File("${appEnginePluginDir}/scripts/_AppEngineCommon.groovy")
eventStatusFinal = { msg ->
def appXmlFile = new File("$stagingDir/WEB-INF/appengine-web.xml")
def xml = new XmlSlurper().parse(appXmlFile)
xml."system-properties".appendNode {
property(name:"stringchararrayaccessor.disabled",value:"true")
}
def smb = new StreamingMarkupBuilder()
def result = smb.bind{
mkp.declareNamespace("":"http://appengine.google.com/ns/1.0")
mkp.yield xml
}
new FileOutputStream(appXmlFile).withWriter('UTF8'){w-> w << result }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment