On Mar 20, 2010, at 10:33 AM, Thomas Mortagne wrote: > On Fri, Mar 19, 2010 at 19:03, Vincent Massol <[email protected]> wrote: >> >> On Mar 19, 2010, at 6:54 PM, Jean-Vincent Drean wrote: >> >>> On Fri, Mar 19, 2010 at 6:47 PM, Vincent Massol <[email protected]> wrote: >>>> >>>> On Mar 19, 2010, at 6:36 PM, Jean-Vincent Drean wrote: >>>> >>>>> On Fri, Mar 19, 2010 at 6:08 PM, Vincent Massol <[email protected]> >>>>> wrote: >>>>>> >>>>>> Proposed Solution: >>>>>> =============== >>>>>> >>>>>> 1) Look for a system property (e.g. xwiki.config.dir) defining a >>>>>> directory location and if defined look for the files in it using File IO >>>>>> (I know it's not JEE kosher but it's acceptable IMO). Could be relative >>>>>> or absolute. >>>>>> 2) If not found, look for a JNDI property that gives the location of the >>>>>> config directory >>>>>> 3) If not found, look for config files in [user.home]/.xwiki >>>>>> 4) If not found, emit an error explaining how to configure xwiki >>>>> >>>>> We could keep the config files in the WAR and fallback on them, WDYT ? >>>>> It would have an interesting side effet, some could only overwrite a >>>>> couple of config entries in ~/.xwiki/xwiki.cfg and leave the other >>>>> entries up to the xwiki.cfg bundled with the WAR (which could evolve >>>>> between releases). >>>> >>>> I've thought about it but it doesn't mean much IMO since: >>>> - hibernate.cfg.xml require configuration to work >>>> - default values should be in the code and not in the config files since >>>> XWiki should work with no xwiki.properties or xwiki.cfg. >>> >>> It'd be perfect but some values aren't in the code, and some shouldn't >>> be imho, the first example I can think of is the list of plugins. >> >> Yes, for values that don't have default in the code, I think we should move >> the in the code. Actually that's: >> >> UC5: Make XWiki work without configuration files. > > Don't mix platform default and XE default configuration values.
Indeed, good point. So yes what I propose for now then is to fallback to WEB-INF/ when not found in steps 1) through 3). What we could though do is not have any config files for platform (and thus use defaults found in the code) but this can be done a bit after. What I'm interested for now is to agree about the system properties, JNDI and the home dir stuff, i.e. steps 1) to 3). Do we have an agreement on that? Thanks -Vincent >> Solution for UC5: >> * Put default values in the code so that XWiki works if there's no >> xwiki.cfg, xwiki.properties or hibernate.cfg.xml files. We would default to >> HSQLDB by default. >> >> WDYT? >> >> Thanks >> -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

