mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Filter additional configuration metadata from archives
Signed-off-by: Wan bin yu <3431359639@qq.com> See gh-51386
This commit is contained in:
committed by
Andy Wilkinson
parent
3a869d0645
commit
0d223cbc77
+25
@@ -192,3 +192,28 @@ The items contained in the "`ignored.properties`" section are removed from the "
|
||||
|
||||
The additional properties file is optional.
|
||||
If you do not have any additional properties, do not add the file.
|
||||
|
||||
The Spring Boot Maven and Gradle plugins exclude `additional-spring-configuration-metadata.json` from the packaged artifact.
|
||||
If you do not use either plugin to build your library, you should configure your build to exclude the file.
|
||||
With Maven, you can configure the `maven-jar-plugin` as follows:
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>META-INF/additional-spring-configuration-metadata.json</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
----
|
||||
|
||||
With Gradle, you can configure the `jar` task as follows:
|
||||
|
||||
[source,gradle]
|
||||
----
|
||||
tasks.named('jar') {
|
||||
exclude('META-INF/additional-spring-configuration-metadata.json')
|
||||
}
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user