Skip to content

Commit 5917a58

Browse files
committed
Add Automatic-Module-Name to manifest file
Update build to add `Automatic-Module-Name` entry to the manifest file. Also refined a few of the other entries that appear. Fixes gh-11994
1 parent 415f44c commit 5917a58

File tree

2 files changed

+29
-3
lines changed
  • spring-boot-project

2 files changed

+29
-3
lines changed

spring-boot-project/spring-boot-dependencies/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<packaging>pom</packaging>
1313
<name>Spring Boot Dependencies</name>
1414
<description>Spring Boot Dependencies</description>
15-
<url>https://projects.spring.io/spring-boot/</url>
15+
<url>https://projects.spring.io/spring-boot/#</url>
1616
<licenses>
1717
<license>
1818
<name>Apache License, Version 2.0</name>

spring-boot-project/spring-boot-parent/pom.xml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,25 @@
523523
</plugins>
524524
</pluginManagement>
525525
<plugins>
526+
<plugin>
527+
<groupId>org.codehaus.mojo</groupId>
528+
<artifactId>build-helper-maven-plugin</artifactId>
529+
<executions>
530+
<execution>
531+
<id>regex-property</id>
532+
<goals>
533+
<goal>regex-property</goal>
534+
</goals>
535+
<configuration>
536+
<name>modulename</name>
537+
<value>${artifactId}</value>
538+
<regex>-</regex>
539+
<replacement>.</replacement>
540+
<failIfNoMatch>true</failIfNoMatch>
541+
</configuration>
542+
</execution>
543+
</executions>
544+
</plugin>
526545
<plugin>
527546
<groupId>org.codehaus.mojo</groupId>
528547
<artifactId>flatten-maven-plugin</artifactId>
@@ -634,10 +653,17 @@
634653
<artifactId>maven-jar-plugin</artifactId>
635654
<configuration>
636655
<archive>
656+
<addMavenDescriptor>false</addMavenDescriptor>
637657
<manifest>
638-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
639-
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
658+
<addDefaultImplementationEntries>false</addDefaultImplementationEntries>
659+
<addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
640660
</manifest>
661+
<manifestEntries>
662+
<Implementation-Title>${project.name}</Implementation-Title>
663+
<Automatic-Module-Name>${modulename}</Automatic-Module-Name>
664+
<Implementation-Version>${project.version}</Implementation-Version>
665+
<Built-By>Spring</Built-By>
666+
</manifestEntries>
641667
</archive>
642668
</configuration>
643669
</plugin>

0 commit comments

Comments
 (0)