String message = String.format("Unsupported update from EAR to WAR for: %s",
configurationRoot.getAbsolutePath());
LOGGER.severe(message);
throw new AppEngineConfigException(message);
}
EarInfo earInfo = EarHelper.readEarInfo(configurationRoot.getAbsolutePath(),
applicationSchemaFile);
String majorVersionId = null;
String urlStreamHandlerType = null;
LoggingConfigurationManager loggingConfigurationManager = new LoggingConfigurationManager();
for (WebModule module : earInfo.getWebModules()) {
module.getWebXml().validate();
AppEngineWebXml appEngineWebXml = module.getAppEngineWebXml();
if (majorVersionId == null) {
majorVersionId = appEngineWebXml.getMajorVersionId();
urlStreamHandlerType = appEngineWebXml.getUrlStreamHandlerType();
}
validateAndRegisterGlobalValues(module, loggingConfigurationManager, null);
}
systemPropertiesManager.setAppengineSystemProperties(sdkRelease,
earInfo.getAppengineApplicationXml().getApplicationId(), majorVersionId);
loggingConfigurationManager.updateLoggingConfiguration();
updateUrlStreamHandlerMode(urlStreamHandlerType);
return earInfo;
}