Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifests of jars built with Gradle do not have a Build-Jdk-Spec entry #32829

Closed
scottfrederick opened this issue Oct 20, 2022 · 1 comment
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@scottfrederick
Copy link
Contributor

Maven adds a Build-Jdk-Spec attribute to META-INF/MANIFEST.MF when building a jar or war file. Paketo Java buildpacks will detect this manifest attribute and use the value of it to decide the major version of the JVM to install in an OCI image.

The Spring Boot Gradle plugin should add Build-Jdk-Spec to the manifest also, to provide similar benefit when a Gradle-built application is packaged by Paketo buildpacks. Other Cloud Native Buildpack vendors could then choose to use this technique also.

Once this is done, the Spring Boot Maven spring-boot:build-image goal and Gradle plugin bootBuildImage task won't need to set the Paketo-specific BP_JVM_VERSION environment variable to configure the JVM version that buildpacks install.

@scottfrederick scottfrederick self-assigned this Oct 20, 2022
@scottfrederick scottfrederick added the status: waiting-for-triage An issue we've not yet triaged label Oct 20, 2022
@philwebb philwebb added type: enhancement A general enhancement type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Oct 24, 2022
@philwebb philwebb added this to the 3.0.x milestone Oct 24, 2022
@philwebb
Copy link
Member

We consider this one a bug because the buildpack can use the entry and we'd like to have alignment with Maven and Gradle, however, it feels too risky for 2.x.

@wilkinsona wilkinsona changed the title Add Build-Jdk-Spec to jar and war manifest when building with Gradle Manifests of jars built with Gradle do not have a Build-Jdk-Spec entry Oct 25, 2022
@scottfrederick scottfrederick modified the milestones: 3.0.x, 3.0.0-RC2 Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants