diff --git a/jre.go b/jre.go index 998f55d..92843ca 100644 --- a/jre.go +++ b/jre.go @@ -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) { diff --git a/jre_test.go b/jre_test.go index 92319ec..73fcafb 100644 --- a/jre_test.go +++ b/jre_test.go @@ -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() {