else
{
// lookup the implementation by extension
final File descriptorFile = deployFiles.iterator().next();
final String ext = FilenameUtils.getExtension(descriptorFile.getName());
final DescriptorParser descriptorParser = parserRegistry.get(ext);
if (descriptorParser == null)
{
// TODO need some kind of an InvalidAppFormatException
throw new MuleRuntimeException(
MessageFactory.createStaticMessage(
String.format("Unsupported deployment descriptor format for app '%s': %s", appName, ext)));
}
desc = descriptorParser.parse(descriptorFile);
// app name is external to the deployment descriptor
desc.setAppName(appName);
}
// get a ref to an optional app props file (right next to the descriptor)