private Configuration gatherConfiguration(String propertiesFilename, Properties defaults) {
CompositeConfiguration composite = new CompositeConfiguration();
// first priority are properties defined on the current JVM (-D switch or through web container)
SystemConfiguration system = new SystemConfiguration();
dumpConfiguration(system, "system");
composite.addConfiguration(system);
// second priority are properties defined on the classpath (like user's home directory)
try {