private static Manifest getManifest(Class<?> clz) {
        String resource = "/" + clz.getName().replace(".", "/") + ".class";
        String fullPath = clz.getResource(resource).toString();
        String archivePath = fullPath.substring(0, fullPath.length() - resource.length());
        if (archivePath.endsWith("\\WEB-INF\\classes") || archivePath.endsWith("/WEB-INF/classes")) {
            archivePath = archivePath.substring(0, archivePath.length() - "/WEB-INF/classes".length()); // Required for wars
        }

        try (InputStream input = new URL(archivePath + "/META-INF/MANIFEST.MF").openStream()) {
            return new Manifest(input);
        } catch (Exception e) {
            throw new RuntimeException("Loading MANIFEST for class " + clz + " failed!", e);
        }
    }
Returns the extension extension meta data
Gets the meta data from the siddhi manager

@param targetDirectoryPath The path of the target directory of the maven module containing extensions
@param logger              The maven plugin logger
@param includeOrigin
@param loadFromAllJars
@return NamespaceMetaData namespace meta data list
@throws MojoFailureException   If this fails to access project dependencies
@throws MojoExecutionException If the classes directory from which classes are loaded is invalid
modules/siddhi-doc-gen/src/main/java/io/siddhi/doc/gen/core/utils/DocumentationUtils.java