spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Add manifest entry to indicate an AOT-processed jar

Open scottfrederick opened this issue 2 years ago • 2 comments

When a Spring Boot jar has been built with AOT processing enabled, an entry named Spring-Boot-Aot-Processed with a value of true should be added to the META-INF/MANIFEST.MF file. This will allow tooling such as Cloud Native Buildpacks to make decisions about how to package the application.

scottfrederick avatar Apr 24 '23 21:04 scottfrederick

I wonder if this may undermine our goal of no longer setting BP_NATIVE_IMAGE (#32884).

If applying the org.springframework.boot.aot plugin to a Gradle project results in the manifest containing Spring-Boot-Aot-Processed: true, buildpacks would then try to build a native image even though the native image plugin hasn't been applied. To overcome this, I think we'd have to default to setting BP_NATIVE_IMAGE to false and then remove that setting once the native image plugin has been applied.

wilkinsona avatar Apr 27 '23 14:04 wilkinsona

Putting this issue on hold. #35205 is a better signal for tooling to decide whether to package the jar in a native image.

scottfrederick avatar Apr 28 '23 21:04 scottfrederick