|
RE: Re: Java World: Build scripts with Groovy and Ant artcicle: msg#00164lang.groovy.user
Hello Patrick, Interesting, I had an idea along the lines that I didn't commit on CVS. It's a GProperties class which would allow us to do things like: props = new GProperties("build.properties") println props.maven.skip.test props.my.other.prop = 3 But I can't really create new branches, just read, and modify actual values. I'll have another go at it if you think it's useful. -- Guillaume Laforge http://glaforge.free.fr/weblog -----Message d'origine----- De : news [mailto:news-WnDAp88bSu3NLxjTenLetw@xxxxxxxxxxxxxxxx]De la part de Patrick Mueller Envoyé : vendredi 29 octobre 2004 14:49 À : groovy-user-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@xxxxxxxxxxxxxxxx Objet : [groovy-user] Re: Java World: Build scripts with Groovy and Ant artcicle I just started converting some build.xml files to build.groovy. I immediately found that I'd like some of my build properties available as Groovy variables, so I now do something like this: props = new Properties(System.properties) props.load(new FileInputStream('build.properties')) I should really close the FileInputStream, but this is a build script so I don't care that much. I haven't looked, but it would nice if there was a one-shot addition to Properties in the GroovyJDK bits so you could do something like this: props = Properties.loadFile('build.properties') and maybe some others like: props = Properties.loadResource(myClass,myResourceName) props = Properties.loadStream(inputStream)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: NullPointerException when invoking JUnit using Groovy Ant under Tomcat, Peter Reilly |
|---|---|
| Next by Date: | Re: Re: Java World: Build scripts with Groovy and Ant artcicle, John Lewis |
| Previous by Thread: | Live Groovy Talk @ Nov/10th @ VanJUG Vancouver, BC, Gerald Bauer |
| Next by Thread: | Re: Re: Java World: Build scripts with Groovy and Ant artcicle, John Lewis |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |