* SusiMail: Fix classpath problem when started manually (ticket #957)

- Remove a couple of dependencies
   - Add jetty-util.jar to console classpath just in case
This commit is contained in:
zzz
2013-06-17 19:39:21 +00:00
parent 36e898d668
commit f9f1391057
3 changed files with 11 additions and 7 deletions

View File

@ -106,7 +106,7 @@
<!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
<!-- very old installs don't have i2psnark,jstl,standard in the classpath... not added in WebAppConfiguration any more -->
<!-- All new jetty 7 jars should have been in 0.9.6, added in 0.9.7 -->
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-webapp.jar" />
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />

View File

@ -88,7 +88,11 @@ public class WebAppConfiguration implements Configuration {
File dir = libDir;
String cp;
if (pluginDir.exists()) {
if (ctxPath.equals("/susimail")) {
// Ticket #957... don't know why...
// Only really required if started manually, but we don't know that from here
cp = "jetty-util.jar";
} else if (pluginDir.exists()) {
File consoleDir = new File(pluginDir, "console");
Properties props = RouterConsoleRunner.webAppProperties(consoleDir.getAbsolutePath());
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
@ -123,7 +127,9 @@ public class WebAppConfiguration implements Configuration {
if (systemCP.contains(jfile.toURI().toURL()) ||
(jdir != null && systemCP.contains(jdir.toURI().toURL()))) {
//System.err.println("Not adding " + path + " to classpath for " + appName + ", already in system classpath");
continue;
// Ticket #957... don't know why...
if (!ctxPath.equals("/susimail"))
continue;
}
System.err.println("Adding " + path + " to classpath for " + appName);
buf.append(path);