Skip to content

Commit

Permalink
Merge pull request #105 from paketo-buildpacks/nmt_8_fix
Browse files Browse the repository at this point in the history
Fixed issue with Java NMT not working with Java 8
  • Loading branch information
Daniel Mikusa authored Sep 28, 2021
2 parents 54a7adc + 5bb7776 commit ffadc4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ 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")
helpers = append(helpers, "debug-8")
} else {
helpers = append(helpers, "security-providers-classpath-9")
helpers = append(helpers, "debug-9")
helpers = append(helpers, "nmt")
}

h, be := libpak.NewHelperLayer(context.Buildpack, helpers...)
Expand Down
3 changes: 1 addition & 2 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}))
Expand Down Expand Up @@ -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",
}))
})

Expand Down

0 comments on commit ffadc4d

Please sign in to comment.