diff --git a/spring-boot-project/spring-boot-cli/build.gradle b/spring-boot-project/spring-boot-cli/build.gradle index d0aa87b86f..a76bda576f 100644 --- a/spring-boot-project/spring-boot-cli/build.gradle +++ b/spring-boot-project/spring-boot-cli/build.gradle @@ -107,7 +107,10 @@ task fullJar(type: Jar) { into "BOOT-INF/classes" } into("") { - from zipTree(configurations.loader.singleFile) + from(zipTree(configurations.loader.singleFile)) { + exclude "META-INF/LICENSE.txt" + exclude "META-INF/NOTICE.txt" + } } manifest { attributes( diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle index b48676b56c..29fcf0bbc6 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle @@ -41,8 +41,9 @@ sourceSets { task reproducibleLoaderJar(type: Jar) { dependsOn configurations.loader - from { - zipTree(configurations.loader.incoming.files.filter {it.name.startsWith "spring-boot-loader" }.singleFile) + from(zipTree(configurations.loader.incoming.files.filter {it.name.startsWith "spring-boot-loader" }.singleFile)) { + exclude "META-INF/LICENSE.txt" + exclude "META-INF/NOTICE.txt" } reproducibleFileOrder = true preserveFileTimestamps = false @@ -52,8 +53,9 @@ task reproducibleLoaderJar(type: Jar) { task reproducibleJarModeLayerToolsJar(type: Jar) { dependsOn configurations.jarmode - from { - zipTree(configurations.jarmode.incoming.files.filter {it.name.startsWith "spring-boot-jarmode-layertools" }.singleFile) + from(zipTree(configurations.jarmode.incoming.files.filter {it.name.startsWith "spring-boot-jarmode-layertools" }.singleFile)) { + exclude "META-INF/LICENSE.txt" + exclude "META-INF/NOTICE.txt" } reproducibleFileOrder = true preserveFileTimestamps = false