- Dashboard and Activity pages now obey the web.generateActivityGraph setting (issue-310)
- Do not log passwords on failed authentication attempts (issue-316)
- Updated default binary and Lucene ignore extensions
+ - Change the WAR baseFolder context parameter to a JNDI env-entry to improve enterprise deployments
additions:
- Added branch graph image servlet based on EGit's branch graph renderer (issue-194)
- Added option to render Markdown commit messages (issue-203)
- Bret Ikehara
- Chad Horohoe
- Domingo Oropeza
+ - Chris Graham
}
#
review the defaults for any new settings. Settings are always versioned\r
with a SINCE x.y.z attribute and also noted in the release changelog.\r
-->\r
- <context-param>\r
- <param-name>baseFolder</param-name>\r
- <param-value>${contextFolder}/WEB-INF/data</param-value>\r
- </context-param>\r
+ <env-entry>\r
+ <description>The base folder is used to specify the root location of your Gitblit data.</description>\r
+ <env-entry-name>baseFolder</env-entry-name>\r
+ <env-entry-type>java.lang.String</env-entry-type>\r
+ <env-entry-value>${contextFolder}/WEB-INF/data</env-entry-value>\r
+ </env-entry>\r
\r
<!-- Gitblit Displayname -->\r
<display-name>\r
import javax.mail.MessagingException;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMultipart;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
logger.error("");
}
+ try {
+ // try to lookup JNDI env-entry for the baseFolder
+ InitialContext ic = new InitialContext();
+ Context env = (Context) ic.lookup("java:comp/env");
+ String val = (String) env.lookup("baseFolder");
+ if (!StringUtils.isEmpty(val)) {
+ path = val;
+ }
+ } catch (NamingException n) {
+ logger.error("Failed to get JNDI env-entry: " + n.getExplanation());
+ }
+
File base = com.gitblit.utils.FileUtils.resolveParameter(Constants.contextFolder$, contextFolder, path);
base.mkdirs();