16 May 17:48
Re: [groovy-user] Property files in jar & ConfigSlurper
From: Jochen Theodorou <blackdrag@...>
Subject: Re: [groovy-user] Property files in jar & ConfigSlurper
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-16 15:48:35 GMT
Subject: Re: [groovy-user] Property files in jar & ConfigSlurper
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-05-16 15:48:35 GMT
Tom Corcoran schrieb:
> 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?
there is a parse method that takes an URL. If you don't worry about the
encoding, then you can use that. If not, then maybe you should read the
script into a string and give that the parse method
bye blackdrag
--
--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
RSS Feed