setSystemProperties();
List connectorsList = (connectors != null ? connectors.getConnectors()
: Connectors.DEFAULT_CONNECTORS);
List userRealmsList = (userRealms != null ? userRealms.getUserRealms() : new ArrayList());
ServerProxy server = new ServerProxyImpl(connectorsList, userRealmsList, requestLog,
jettyXml);
try
{
Iterator iterator = webapps.iterator();
while (iterator.hasNext())
{
WebApp webAppConfiguration = (WebApp) iterator.next();
WebApplicationProxyImpl webApp = new WebApplicationProxyImpl(webAppConfiguration
.getName());
webApp.setSourceDirectory(webAppConfiguration.getWarFile());
webApp.setContextPath(webAppConfiguration.getContextPath());
webApp.setWebXml(webAppConfiguration.getWebXmlFile());
webApp.setJettyEnvXml(webAppConfiguration.getJettyEnvXml());
webApp.setClassPathFiles(webAppConfiguration.getClassPathFiles());
webApp.setLibrariesConfiguration(webAppConfiguration.getLibrariesConfiguration());
webApp.setExtraScanTargetsConfiguration(webAppConfiguration
.getScanTargetsConfiguration());
webApp.setContextHandlers(webAppConfiguration.getContextHandlers());
webApp.setWebDefaultXmlFile(webAppConfiguration.getWebDefaultXmlFile());
server.addWebApplication(webApp, webAppConfiguration.getScanIntervalSeconds());
}
}
catch (Exception e) {
throw new BuildException(e);
}
server.start();
}