The file should only be added to the jar when there are args to be written to it.
Comment From: wilkinsona
A consequence of the empty file is that buildpacks will always try to build a native image from the app. If that's not wanted, the behaviour can be disabled by setting BP_NATIVE_IMAGE to false in the environment of the bootBuildImage task:
tasks.named("bootBuildImage") {
environment = ["BP_NATIVE_IMAGE" : "false"]
}
Comment From: jfiedler-jaconi
Observing the same problem today when upgrading to Spring Boot 3. In my case even setting BP_NATIVE_IMAGE to false does not help. The build still tries to build the native image (which fails for some other incompatibility reasons).
Comment From: wilkinsona
Thanks, @jfiedler-jaconi. The buildpacks team will investigate why the workaround wasn't successful. In the meantime, an update has been made on the buildpacks side so the problem should no longer occur. paketobuildpacks/builder@sha256:dbc641980f88a7f1f8936302d099bbc45e50d35770b00a9379c5e66e34e7d18a is the updated builder that should be pulled the next time you run bootBuildImage.