From 75d5d081f381399f22660dc3c684a550ea93de59 Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Tue, 28 Sep 2021 10:06:08 +0100 Subject: [PATCH] Fixed issue with Java NMT not working with Java 8 --- build.go | 3 ++- build_test.go | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.go b/build.go index 8ede01f..56f4485 100644 --- a/build.go +++ b/build.go @@ -127,7 +127,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) { if IsLaunchContribution(jrePlanEntry.Metadata) { helpers := []string{"active-processor-count", "java-opts", "jvm-heap", "link-local-dns", "memory-calculator", - "openssl-certificate-loader", "security-providers-configurer", "jmx", "nmt"} + "openssl-certificate-loader", "security-providers-configurer", "jmx"} if IsBeforeJava9(depJRE.Version) { helpers = append(helpers, "security-providers-classpath-8") @@ -135,6 +135,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) { } else { helpers = append(helpers, "security-providers-classpath-9") helpers = append(helpers, "debug-9") + helpers = append(helpers, "nmt") } h, be := libpak.NewHelperLayer(context.Buildpack, helpers...) diff --git a/build_test.go b/build_test.go index 3e0d285..f9d02ba 100644 --- a/build_test.go +++ b/build_test.go @@ -113,7 +113,6 @@ func testBuild(t *testing.T, context spec.G, it spec.S) { "openssl-certificate-loader", "security-providers-configurer", "jmx", - "nmt", "security-providers-classpath-8", "debug-8", })) @@ -144,9 +143,9 @@ func testBuild(t *testing.T, context spec.G, it spec.S) { "openssl-certificate-loader", "security-providers-configurer", "jmx", - "nmt", "security-providers-classpath-9", "debug-9", + "nmt", })) })