ModuleScanResult scanResult = scanner.scan();
if (!scanResult.getDiscoveredResourceUrls().isEmpty())
{
ContainerServiceExtension serviceExtension = new ContainerServiceExtension(container, addon);
ContainerBeanRegistrant registrantExtension = new ContainerBeanRegistrant();
weld = new ModularWeld(scanResult);
weld.addExtension(serviceExtension);
weld.addExtension(registrantExtension);
WeldContainer container = weld.initialize();