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);
}