diff options
author | James Moger <james.moger@gitblit.com> | 2012-12-06 17:04:17 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-12-06 17:04:17 -0500 |
commit | e783f280443935abff58f3f21eb9ab7c1e3c324c (patch) | |
tree | 0c29b3065e7c32f2e70809a97d1e2cccef16075f /src | |
parent | dc9735acfc9dcea6b970d18a315cbf8a6997c4f9 (diff) | |
download | gitblit-e783f280443935abff58f3f21eb9ab7c1e3c324c.tar.gz gitblit-e783f280443935abff58f3f21eb9ab7c1e3c324c.zip |
Tweak reading war setting overrides
Diffstat (limited to 'src')
-rw-r--r-- | src/com/gitblit/GitBlit.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java index c2d4a85a..46b0d406 100644 --- a/src/com/gitblit/GitBlit.java +++ b/src/com/gitblit/GitBlit.java @@ -3044,22 +3044,20 @@ public class GitBlit implements ServletContextListener { ServletContext context = contextEvent.getServletContext();
WebXmlSettings webxmlSettings = new WebXmlSettings(context);
- // 0.7.0 web.properties in the deployed war folder
- String webProps = context.getRealPath("/WEB-INF/web.properties");
+ // gitblit.properties file located within the webapp
+ String webProps = context.getRealPath("/WEB-INF/gitblit.properties");
if (!StringUtils.isEmpty(webProps)) {
File overrideFile = new File(webProps);
- if (overrideFile.exists()) {
- webxmlSettings.applyOverrides(overrideFile);
- }
+ webxmlSettings.applyOverrides(overrideFile);
}
-
- // 0.8.0 gitblit.properties file located outside the deployed war
+ // gitblit.properties file located outside the deployed war
// folder lie, for example, on RedHat OpenShift.
File overrideFile = getFileOrFolder("gitblit.properties");
if (!overrideFile.getPath().equals("gitblit.properties")) {
webxmlSettings.applyOverrides(overrideFile);
}
+
configureContext(webxmlSettings, true);
// Copy the included scripts to the configured groovy folder
|