Actually, the following syntax pom { project { properties { foo = 'test' } } }.writeTo("mypom.xml")
does work, resulting in <properties> <foo>test</foo> </properties> however the following, with a dot-delimited element name does not pom { project { properties { foo.bar = 'test' } } }.writeTo("mypom.xml") in the case above, there is no <properties/> block written at all. On Jul 9, 2010, at 6:05 AM, Chris Beams wrote: > Hi Rene, > > I was mistaken in my description. It *is* valid syntax, it just doesn't work > as desired. Groovy nor Gradle complains about the syntax, but the resulting > pom does not actually contain the following chunk of XML as intended: > > <properties> > > <project.build.sourceEncoding>UTF8</project.build.sourceEncoding> > </properties> > > I understand this kind of invent-your-own-element approach that the pom > encourages might be too much for the pom builder to cope with. All I really > need is a way to drop down to the XML itself and post-process the document by > adding these couple of children. > > - C > > On Jul 8, 2010, at 10:16 PM, Rene Groeschke wrote: > >> Hi Chris, >> what is the exception you get with the snippet below? I just run this >> snippet and it works. >> >> Am 08.07.10 18:36, schrieb Chris Beams: >>> pom { >>> project { >>> properties { >>> project.build.sourceEncoding = 'UTF8' >>> } >>> } >>> }.writeTo("mypom.xml") >>> >>> This is probably more of a Groovy question than a Gradle question, but the >>> dot-delimited name is not valid syntax. >>> >>> Is there some syntactic workaround here? >>> >>> - C >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> >> -- >> ------------------------------------ >> Rene Groeschke >> >> r...@breskeby.com >> http://www.breskeby.com >> http://twitter.com/breskeby >> ------------------------------------ >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email