spring-projects / spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.
https://spring.io/projects/spring-boot
Apache License 2.0
75.16k stars 40.68k forks source link

Investigate why the Native Build Tools plugin isn't applied in PaketoBuilderTests.nativeApp #42338

Closed mhalbritter closed 1 month ago

mhalbritter commented 1 month ago

spring-boot-system-tests/spring-boot-image-tests/src/systemTest/resources/org/springframework/boot/image/paketo/PaketoBuilderTests-nativeApp.gradle has this snippet:

bootJar {
    manifest {
        attributes(
            'Implementation-Version': '1.0.0',
            'Implementation-Title': 'Paketo Test',
            'Spring-Boot-Native-Processed': 'true'
        )
    }
}

'Spring-Boot-Native-Processed': 'true' shouldn't be necessary, because it is set by our NativeImagePluginAction. However, for reasons unclear to me, the NativeImagePluginAction isn't executed in this build, despite the NBT plugin in the plugins section.

When removing the .withPluginClasspath call in org.springframework.boot.testsupport.gradle.testkit.GradleBuild#prepareRunner, it works. No idea if that is a red herring or not.

mhalbritter commented 1 month ago

I stumbled over that while working on https://github.com/spring-projects/spring-boot/issues/32884.