extensionManager.discoverExtensions(loadedBundles); final Set<Class> extensions = extensionManager.getTypes(bundleCoordinate); if (extensions.isEmpty()) { LOGGER.debug("No documentation to generate for {} because no extensions were found",
private File unpack(final File narFile) { try (final JarFile nar = new JarFile(narFile)) { final Manifest manifest = nar.getManifest(); final Attributes attributes = manifest.getMainAttributes(); final String groupId = attributes.getValue(NarManifestEntry.NAR_GROUP.getManifestName()); final String narId = attributes.getValue(NarManifestEntry.NAR_ID.getManifestName()); final String version = attributes.getValue(NarManifestEntry.NAR_VERSION.getManifestName()); if (NarClassLoaders.FRAMEWORK_NAR_ID.equals(narId)) { LOGGER.error("Found a framework NAR, will not load {}", new Object[]{narFile.getAbsolutePath()}); return null; } final BundleCoordinate coordinate = new BundleCoordinate(groupId, narId, version); final Bundle bundle = extensionManager.getBundle(coordinate); if (bundle != null) { LOGGER.warn("Found existing bundle with coordinate {}, will not load {}", new Object[]{coordinate, narFile.getAbsolutePath()}); return null; } final File unpackedExtension = NarUnpacker.unpackNar(narFile, extensionsWorkingDir); NarUnpacker.mapExtension(unpackedExtension, coordinate, docsWorkingDir, extensionMapping); return unpackedExtension; } catch (Exception e) { LOGGER.error("Error unpacking " + narFile.getAbsolutePath(), e); return null; } }
extensionManager.discoverExtensions(systemBundle, bundles); extensionManager.logClassLoaderMapping();