Tom Corcoran | 16 May 16:47
Picon

Re: [groovy-user] Property files in jar & ConfigSlurper


Sounds promising. I'm not sure how to pipe the file into ConfigSlurper. I
could do:

InputStream is = getClass().getResourceAsStream('properties/config.groovy')

but not sure how to get ConfigSlurper to read the InputStream

Or is there a better way?

Tom Corcoran schrieb:
> I have learned from this list that groovy property files are not really
> property files but groovy script. We have been storing them in a
> /properties
> directory like with Java properties files. I have not noticed .class files
> being compiled from them so am a little confused how that works.
> 
> Anyway, we are packing the "property files" in a jar and are wondering how
> to rig ConfigSlurper to read in from a file in the jar?

groovy can compile classes in memory and on the fly... like it does with 
any .groovy file you give it. ConfigSlurper is causing this by feeding 
the file to our compiler

--

-- 
View this message in context: http://www.nabble.com/Property-files-in-jar---ConfigSlurper-tp17275925p17276542.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane