protected void generateFiles() throws ConfigurationException { try { serverConfigurator.parseAndCopy(userConfig); serverConfigurator.dumpProperties(userConfig); log.info("Configuration files generated."); // keep true or false, switch once to false if (onceGeneration) { setOnceToFalse = true; writeConfiguration(); } } catch (FileNotFoundException e) { throw new ConfigurationException("Missing file: " + e.getMessage(), e); } catch (TemplateException | ParseException e) { throw new ConfigurationException("Could not process FreeMarker template: " + e.getMessage(), e); } catch (IOException e) { throw new ConfigurationException("Configuration failure: " + e.getMessage(), e); } }