@NotNull
  public java.util.jar.Manifest build() throws ManifestBuilderException {
    try {
      Element mavenPackagingPluginConfiguration = getMavenPackagingPluginConfiguration(myMavenProject);
      final Element mavenArchiveConfiguration =
        mavenPackagingPluginConfiguration != null ? mavenPackagingPluginConfiguration.getChild("archive") : null;

      if (mavenArchiveConfiguration == null) return getDefaultManifest(Collections.emptyMap());

      final Element manifestEntries = mavenArchiveConfiguration.getChild("manifestEntries");
      Map<String, String> entries = getManifestEntries(manifestEntries);

      final Element manifestConfiguration = mavenArchiveConfiguration.getChild("manifest");
      final Manifest configuredManifest = getConfiguredManifest(myMavenProject, manifestConfiguration, entries);

      if (!entries.isEmpty()) {
        addManifestEntries(configuredManifest, entries);
      }

      addCustomManifestSections(configuredManifest, mavenArchiveConfiguration);

      Manifest finalManifest = getDefaultManifest(entries);
      // merge configured manifest
      merge(finalManifest, configuredManifest);

      // merge user supplied manifest
      final Manifest userSuppliedManifest = getUserSuppliedManifest(mavenArchiveConfiguration);
      merge(finalManifest, userSuppliedManifest);
      return finalManifest;
    }
    catch (ManifestException e) {
      throw new ManifestBuilderException(e);
    }
  }
@NotNull
  public java.util.jar.Manifest build()