Skip to content

Commit 36392eb

Browse files
committed
- Add support for JDK 8u421
- Add support for JDK 11.0.24
1 parent e87dd74 commit 36392eb

File tree

3 files changed

+44
-10
lines changed

3 files changed

+44
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
### Added
10+
- Add support for JDK 8u421
11+
- Add support for JDK 11.0.24
12+
913
### Fixed
1014
- Fixed incorrect syntax in RTK config file
1115

manifests/install_aem_java.pp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@
4242
$jdk_version_splitted = split($jdk_version, 'u')
4343
$jdk_version_major = $jdk_version_splitted[0]
4444
$jdk_version_update = $jdk_version_splitted[1]
45-
# Support of different JDK8 versions with different binary pathes
46-
if Integer($jdk_version_update) >= 371 {
45+
# Support of different JDK8 versions with different binary patches
46+
if Integer($jdk_version_update) >= 421 {
47+
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}.0_${jdk_version_update}-oracle-x64"
48+
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
49+
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
50+
} elsif Integer($jdk_version_update) >= 371 and Integer($jdk_version_update) < 421 {
4751
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}-oracle-x64"
4852
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
4953
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
@@ -68,9 +72,20 @@
6872
# to receive JDK version 11.0.7
6973
$jdk_version_raw = split($jdk_filename_splitted[1], '_')
7074
$jdk_version = $jdk_version_raw[0]
71-
$java_home_path = "/usr/java/jdk-${jdk_version}"
72-
$libjvm_content_path= "${java_home_path}/lib/server/\n"
73-
$cacert_path = "${java_home_path}/lib/security/cacerts"
75+
$jdk_version_splitted = split($jdk_version, '\.') # 11.0.7
76+
$jdk_version_major = $jdk_version_splitted[0]
77+
$jdk_version_minor = $jdk_version_splitted[1]
78+
$jdk_version_patch = $jdk_version_splitted[2]
79+
# Support of different JDK8 versions with different binary patches
80+
if Integer($jdk_version_patch) >= 24 {
81+
$java_home_path = "/usr/lib/jvm/jdk-${jdk_version}-oracle-x64"
82+
$libjvm_content_path= "${java_home_path}/lib/server/\n"
83+
$cacert_path = "${java_home_path}/lib/security/cacerts"
84+
} else {
85+
$java_home_path = "/usr/java/jdk-${jdk_version}"
86+
$libjvm_content_path= "${java_home_path}/lib/server/\n"
87+
$cacert_path = "${java_home_path}/lib/security/cacerts"
88+
}
7489
}
7590
default: {
7691
fail('Error: Unknown Java Version. Supported java versions are : ( 8 | 11 )')

manifests/install_java.pp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@
3737
$jdk_version_splitted = split($jdk_version, 'u')
3838
$jdk_version_major = $jdk_version_splitted[0]
3939
$jdk_version_update = $jdk_version_splitted[1]
40-
# Support of different JDK8 versions with different binary pathes
41-
if Integer($jdk_version_update) >= 371 {
40+
# Support of different JDK8 versions with different binary patches
41+
if Integer($jdk_version_update) >= 421 {
42+
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}.0_${jdk_version_update}-oracle-x64"
43+
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
44+
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
45+
} elsif Integer($jdk_version_update) >= 371 and Integer($jdk_version_update) < 421 {
4246
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}-oracle-x64"
4347
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
4448
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
@@ -63,9 +67,20 @@
6367
# to receive JDK version 11.0.9
6468
$jdk_version_raw = split($jdk_filename_splitted[1], '_')
6569
$jdk_version = $jdk_version_raw[0]
66-
$java_home_path = "/usr/java/jdk-${jdk_version}"
67-
$libjvm_content_path = "${java_home_path}/lib/server/\n"
68-
$cacert_path = "${java_home_path}/lib/security/cacerts"
70+
$jdk_version_splitted = split($jdk_version, '\.') # 11.0.9
71+
$jdk_version_major = $jdk_version_splitted[0]
72+
$jdk_version_minor = $jdk_version_splitted[1]
73+
$jdk_version_patch = $jdk_version_splitted[2]
74+
# Support of different JDK8 versions with different binary patches
75+
if Integer($jdk_version_patch) >= 24 {
76+
$java_home_path = "/usr/lib/jvm/jdk-${jdk_version}-oracle-x64"
77+
$libjvm_content_path= "${java_home_path}/lib/server/\n"
78+
$cacert_path = "${java_home_path}/lib/security/cacerts"
79+
} else {
80+
$java_home_path = "/usr/java/jdk-${jdk_version}"
81+
$libjvm_content_path= "${java_home_path}/lib/server/\n"
82+
$cacert_path = "${java_home_path}/lib/security/cacerts"
83+
}
6984
}
7085
default: {
7186
fail('Error: Unknown Java Version. Supported java versions are : ( 8 | 11 )')

0 commit comments

Comments
 (0)