We’ve just trialled XWiki as a replacement for a few existing wikis, and it looks great from a features perspective. I’m now planning out what will be the production install.
I want to make life as easy as possible for those who’ll come after me, so I’m trying to locate all config files outside of the webapp directory tree, so upgrades are as simple as “read release notes, delete old war, extract new war”. This is perfectly doable with xwiki.properties / xwiki.cfg, but I’ve not yet found a clean way to handle hibernate.cfg.xml. (I’m deploying using Jetty.)
Has anyone created a configuration like this before? Have any suggestions, either in general or for hibernate specifically?
Yep, though I haven’t needed to edit xwiki.cfg yet, so haven’t created that one.
I saw that, but that path unfortunately looks like it’s relative to the webapp directory - notice how the default path is "/WEB-INF/hibernate.cfg.xml" (with the leading /). Unless you know otherwise?
(Here’s where that path appears to be consumed, if it helps.)
Yes and as already stated by Vincent, it can be done.
I’m succesfully using:
xwiki.cfg
xwiki.properties
hibernate.cfg.xml
from /etc - using Tomcat, but I guess that’s servlet container independent.
Just be careful that when upgrading you’ll still need to check you config files against the new ones coming in the WAR: both for new parameters you didn’t edit and for extra parameters you may have added - e.g. I have the LDAP extension and it requires adding parameters to the configuration file.