Hi devs,

I've been wanting to make it easy to upgrade XWiki from one version to another 
for some time (I'm not talking about XAR upgrade here, that's the extension 
manager). I'm talking about XWiki configuration files.

Here are the use cases I'd like to solve:

UC1: Easy install: no need to explode the XAR to install XWiki. See also the 
comment about xwiki on http://java.dzone.com/articles/file-system-storage-and
UC2: Easy upgrade: no need to take care about saving the configuration so that 
it's not overwritten by an upgrade
UC3: Should be possible to have multiple installs on the same machine and 
running at the same time
UC4: Should be possible to control the location of the configuration files for 
our automated functional tests (so that we control the configuration used)

The configuration files I'm talking about are:
* xwiki.cfg
* hibernate.cfg.xml
* xwiki.properties

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

1) solves UC3 and UC4
2) solves UC3
3) solves UC1 and UC2

Note
====

I'm not suggesting any backward compatibility here since it's a new way of 
configuring XWiki. It means upgraders will need to read the release notes/doc 
to understand how to configure XWiki.

If really needed, we could devise a backward compat strategy, but I'm not sure 
we absolutely need that.

WDYT?

Thanks
-Vincent

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to