void (@NotNull MavenProject mavenProject, @NotNull Module module, @NotNull MavenModuleResourceConfiguration resourceConfig) { if (mavenProject.isAggregator()) return; if (Boolean.parseBoolean(IDEA_MAVEN_DISABLE_MANIFEST)) { resourceConfig.manifest = null; return; } try { String jdkVersion = null; Sdk sdk = ModuleRootManager.getInstance(module).getSdk(); if (sdk != null && (jdkVersion = sdk.getVersionString()) != null) { final int quoteIndex = jdkVersion.indexOf('"'); if (quoteIndex != -1) { jdkVersion = jdkVersion.substring(quoteIndex + 1, jdkVersion.length() - 1); } } MavenDomProjectModel domModel = MavenDomUtil.getMavenDomProjectModel(module.getProject(), mavenProject.getFile()); if (domModel != null) { UnsyncByteArrayOutputStream outputStream = new UnsyncByteArrayOutputStream(); new ManifestBuilder(mavenProject).withJdkVersion(jdkVersion).build().write(outputStream); String resolvedText = MavenPropertyResolver.resolve(outputStream.toString(), domModel); resourceConfig.manifest = Base64.getEncoder().encodeToString(resolvedText.getBytes(StandardCharsets.UTF_8)); } resourceConfig.classpath = ManifestBuilder.getClasspath(mavenProject); } catch (ManifestBuilder.ManifestBuilderException e) { LOG.warn("Unable to generate artifact manifest", e); } catch (Exception e) { LOG.warn("Unable to save generated artifact manifest", e); } }