@Override
    protected void validateManifest(JarContext reporter, JarFile jar, Manifest mf) {
        // Check for required OSGI headers
        Attributes attributes = mf.getMainAttributes();
        HashSet<String> mfAttributes = new HashSet<>();
        for (Map.Entry<Object,Object> entry : attributes.entrySet()) {
            mfAttributes.add(entry.getKey().toString());
        }
        List<String> requiredOSGIHeaders = List.of(
                "Bundle-ManifestVersion", "Bundle-Name", "Bundle-SymbolicName", "Bundle-Version");
        for (String header : requiredOSGIHeaders) {
            if (!mfAttributes.contains(header)) {
                reporter.illegal("Required OSGI header '" + header + "' was not found in manifest in '" + filename(jar) + "'");
            }
        }

        if (attributes.getValue("Bundle-Version").endsWith(".SNAPSHOT")) {
            log(reporter.deployState(), Level.WARNING,
                    "Deploying snapshot bundle " + filename(jar) + ".\nTo use this bundle, you must include the " +
                            "qualifier 'SNAPSHOT' in the version specification in services.xml.");
        }

        if (attributes.getValue("Import-Package") != null) {
            validateImportedPackages(reporter.deployState(), jar, mf);
        }
    }
A validator for bundles.

@author hmusum
@author bjorncs
config-model/src/main/java/com/yahoo/vespa/model/application/validation/BundleValidator.java