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

Fix spring-boot#481: add JRE_HOME #395

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jre.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (j JRE) Contribute(layer libcnb.Layer) (libcnb.Layer, error) {

if IsBuildContribution(j.Metadata) {
layer.BuildEnvironment.Default("JAVA_HOME", layer.Path)
layer.BuildEnvironment.Default("JRE_HOME", layer.Path)
}

if IsLaunchContribution(j.Metadata) {
Expand Down
1 change: 1 addition & 0 deletions jre_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func testJRE(t *testing.T, context spec.G, it spec.S) {
Expect(layer.LayerTypes.Build).To(BeTrue())
Expect(layer.LayerTypes.Cache).To(BeTrue())
Expect(layer.BuildEnvironment["JAVA_HOME.default"]).To(Equal(layer.Path))
Expect(layer.BuildEnvironment["JRE_HOME.default"]).To(Equal(layer.Path))
})

it("marks before Java 9 JRE layer for launch", func() {
Expand Down