|
17 | 17 | package org.springframework.ws.gradle.conventions;
|
18 | 18 |
|
19 | 19 | import java.util.Map;
|
| 20 | +import java.util.TreeMap; |
20 | 21 |
|
21 | 22 | import io.spring.javaformat.gradle.SpringJavaFormatPlugin;
|
22 | 23 | import org.gradle.api.JavaVersion;
|
@@ -79,11 +80,15 @@ private void configureDependencyManagement(Project project) {
|
79 | 80 | }
|
80 | 81 |
|
81 | 82 | private void configureJarManifest(Project project) {
|
82 |
| - project.getTasks() |
83 |
| - .named("jar", Jar.class, |
84 |
| - (jar) -> jar.manifest((manifest) -> manifest.attributes(Map.of("Build-Jdk-Spec", |
85 |
| - JAVA_BASELINE.getMajorVersion(), "Built-By", "Spring", "Implementation-Title", |
86 |
| - project.getDescription(), "Implementation-Version", project.getVersion())))); |
| 83 | + project.getTasks().named("jar", Jar.class, (jar) -> jar.manifest((manifest) -> { |
| 84 | + Map<String, Object> attributes = new TreeMap<>(); |
| 85 | + attributes.put("Automatic-Module-Name", project.getName().replace("-", ".")); |
| 86 | + attributes.put("Build-Jdk-Spec", JAVA_BASELINE.getMajorVersion()); |
| 87 | + attributes.put("Built-By", "Spring"); |
| 88 | + attributes.put("Implementation-Title", project.getDescription()); |
| 89 | + attributes.put("Implementation-Version", project.getVersion()); |
| 90 | + manifest.attributes(attributes); |
| 91 | + })); |
87 | 92 | }
|
88 | 93 |
|
89 | 94 | private void configureToolchain(Project project, JavaPluginExtension java) {
|
|
0 commit comments