if (bm.isValid()) {
extraBundlesInfo.add(new SimpleBundleInfo(_applicationMetadataFactory, bm, f.toURL().toExternalForm()));
} else if (deploymentManifest == null) {
// We have a jar that needs converting to a bundle, or a war to migrate to a WAB
// We only do this if a DEPLOYMENT.MF does not exist.
BundleConversion convertedBinary = null;
Iterator<BundleConverter> converters = _bundleConverters.iterator();
List<ConversionException> conversionExceptions = Collections.emptyList();
while (converters.hasNext() && convertedBinary == null) {
try {
convertedBinary = converters.next().convert(ebaFile, f);
} catch (ServiceException sx) {
// We'll get this if our optional BundleConverter has not been injected.
} catch (ConversionException cx) {
conversionExceptions.add(cx);
}
}
if (conversionExceptions.size() > 0) {
for (ConversionException cx : conversionExceptions) {
_logger.error("APPMANAGEMENT0004E", new Object[]{f.getName(), appName, cx});
}
throw new ManagementException (MessageUtil.getMessage("APPMANAGEMENT0005E", appName));
}
if (convertedBinary != null) {
modifiedBundles.put (f.getName(), convertedBinary);
extraBundlesInfo.add(convertedBinary.getBundleInfo(_applicationMetadataFactory));
}
}
}
}