|
Re: Java World: Build scripts with Groovy and Ant artcicle: msg#00162lang.groovy.user
Daniel Serodio wrote: There's one great Ant feature that's missing from this example: build.properties files. 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) -- Patrick Mueller pmuellr-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Java World: Build scripts with Groovy and Ant artcicle, John Lewis |
|---|---|
| Next by Date: | Re: NullPointerException when invoking JUnit using Groovy Ant under Tomcat, Peter Reilly |
| Previous by Thread: | Re: Java World: Build scripts with Groovy and Ant artcicle, John Lewis |
| 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 |