@NotNull
  private static Manifest getConfiguredManifest(@NotNull MavenProject mavenProject,
                                                @Nullable Element manifestConfiguration,
                                                @NotNull Map<String, String> entries) throws ManifestException {
    final Manifest manifest = new Manifest();

    boolean isAddDefaultSpecificationEntries =
      Boolean.parseBoolean(MavenJDOMUtil.findChildValueByPath(manifestConfiguration, "addDefaultSpecificationEntries", "false"));
    if (isAddDefaultSpecificationEntries) {
      addManifestAttribute(manifest, entries, "Specification-Title", mavenProject.getName());
      addManifestAttribute(manifest, entries, "Specification-Version", mavenProject.getMavenId().getVersion());
    }

    boolean isAddDefaultImplementationEntries =
      Boolean.parseBoolean(MavenJDOMUtil.findChildValueByPath(manifestConfiguration, "addDefaultImplementationEntries", "false"));
    if (isAddDefaultImplementationEntries) {
      addManifestAttribute(manifest, entries, "Implementation-Title", mavenProject.getName());
      addManifestAttribute(manifest, entries, "Implementation-Version", mavenProject.getMavenId().getVersion());
      addManifestAttribute(manifest, entries, "Implementation-Vendor-Id", mavenProject.getMavenId().getGroupId());
    }

    String packageName = MavenJDOMUtil.findChildValueByPath(manifestConfiguration, "packageName");
    if (packageName != null) {
      addManifestAttribute(manifest, entries, "Package", packageName);
    }

    String mainClass = MavenJDOMUtil.findChildValueByPath(manifestConfiguration, "mainClass");
    if (!StringUtil.isEmpty(mainClass)) {
      addManifestAttribute(manifest, entries, "Main-Class", mainClass);
    }

    boolean isAddClasspath = Boolean.parseBoolean(MavenJDOMUtil.findChildValueByPath(manifestConfiguration, "addClasspath", "false"));
    if (isAddClasspath) {
      final ManifestImporter manifestImporter = ManifestImporter.getManifestImporter(mavenProject.getPackaging());
      String classpath = manifestImporter.getClasspath(mavenProject, manifestConfiguration);
      if (!classpath.isEmpty()) {
        addManifestAttribute(manifest, "Class-Path", classpath);
      }
    }
    return manifest;
  }
@NotNull
  private static Manifest getConfiguredManifest(@NotNull MavenProject mavenProject,
                                                @Nullable Element manifestConfiguration,
                                                @NotNull Map<String, String> entries)