| | |
| | | }
|
| | |
|
| | | private static void generateWebXml(Params params) throws Exception {
|
| | | StringBuilder parameters = new StringBuilder();
|
| | | // Read the current Gitblit properties
|
| | | if (params.propertiesFile != null) {
|
| | | BufferedReader propertiesReader = new BufferedReader(new FileReader(new File(
|
| | | params.propertiesFile)));
|
| | |
|
| | |
| | | }
|
| | | propertiesReader.close();
|
| | |
|
| | | StringBuilder parameters = new StringBuilder();
|
| | |
|
| | | for (Setting setting : settings) {
|
| | | for (String comment : setting.comments) {
|
| | | parameters.append(MessageFormat.format(COMMENT_PATTERN, comment));
|
| | |
| | | parameters.append(MessageFormat.format(PARAM_PATTERN, setting.name,
|
| | | StringUtils.escapeForHtml(setting.value, false)));
|
| | | }
|
| | |
|
| | | }
|
| | | // Read the prototype web.xml file
|
| | | File webxml = new File(params.sourceFile);
|
| | | char[] buffer = new char[(int) webxml.length()];
|
| | |
| | | @Parameter(names = { "--sourceFile" }, description = "Source web.xml file", required = true)
|
| | | public String sourceFile;
|
| | |
|
| | | @Parameter(names = { "--propertiesFile" }, description = "Properties settings file", required = true)
|
| | | @Parameter(names = { "--propertiesFile" }, description = "Properties settings file")
|
| | | public String propertiesFile;
|
| | |
|
| | | @Parameter(names = { "--destinationFile" }, description = "Destination web.xml file", required = true)
|