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
This commit is contained in:
Phillip Webb 2018-02-21 16:01:59 -08:00
parent 415f44c02b
commit 5917a58bf1
2 changed files with 29 additions and 3 deletions

View File

@ -12,7 +12,7 @@
<packaging>pom</packaging>
<name>Spring Boot Dependencies</name>
<description>Spring Boot Dependencies</description>
<url>https://projects.spring.io/spring-boot/</url>
<url>https://projects.spring.io/spring-boot/#</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>

View File

@ -523,6 +523,25 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>regex-property</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>modulename</name>
<value>${artifactId}</value>
<regex>-</regex>
<replacement>.</replacement>
<failIfNoMatch>true</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
@ -634,10 +653,17 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>false</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Implementation-Title>${project.name}</Implementation-Title>
<Automatic-Module-Name>${modulename}</Automatic-Module-Name>
<Implementation-Version>${project.version}</Implementation-Version>
<Built-By>Spring</Built-By>
</manifestEntries>
</archive>
</configuration>
</plugin>