Skip to content

Commit

Permalink
Merge pull request #395 from paketo-buildpacks/fix-sb-481
Browse files Browse the repository at this point in the history
Fix spring-boot#481: add JRE_HOME
  • Loading branch information
anthonydahanne authored May 23, 2024
2 parents 11f657c + b165791 commit ed45e1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
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

0 comments on commit ed45e1b

Please sign in to comment.