Skip to content

Commit

Permalink
- Add support for JDK 8u421
Browse files Browse the repository at this point in the history
- Add support for JDK 11.0.24
  • Loading branch information
ovlords committed Jan 29, 2025
1 parent e87dd74 commit 36392eb
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Add support for JDK 8u421
- Add support for JDK 11.0.24

### Fixed
- Fixed incorrect syntax in RTK config file

Expand Down
25 changes: 20 additions & 5 deletions manifests/install_aem_java.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@
$jdk_version_splitted = split($jdk_version, 'u')
$jdk_version_major = $jdk_version_splitted[0]
$jdk_version_update = $jdk_version_splitted[1]
# Support of different JDK8 versions with different binary pathes
if Integer($jdk_version_update) >= 371 {
# Support of different JDK8 versions with different binary patches
if Integer($jdk_version_update) >= 421 {
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}.0_${jdk_version_update}-oracle-x64"
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
} elsif Integer($jdk_version_update) >= 371 and Integer($jdk_version_update) < 421 {
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}-oracle-x64"
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
Expand All @@ -68,9 +72,20 @@
# to receive JDK version 11.0.7
$jdk_version_raw = split($jdk_filename_splitted[1], '_')
$jdk_version = $jdk_version_raw[0]
$java_home_path = "/usr/java/jdk-${jdk_version}"
$libjvm_content_path= "${java_home_path}/lib/server/\n"
$cacert_path = "${java_home_path}/lib/security/cacerts"
$jdk_version_splitted = split($jdk_version, '\.') # 11.0.7
$jdk_version_major = $jdk_version_splitted[0]
$jdk_version_minor = $jdk_version_splitted[1]
$jdk_version_patch = $jdk_version_splitted[2]
# Support of different JDK8 versions with different binary patches
if Integer($jdk_version_patch) >= 24 {
$java_home_path = "/usr/lib/jvm/jdk-${jdk_version}-oracle-x64"
$libjvm_content_path= "${java_home_path}/lib/server/\n"
$cacert_path = "${java_home_path}/lib/security/cacerts"
} else {
$java_home_path = "/usr/java/jdk-${jdk_version}"
$libjvm_content_path= "${java_home_path}/lib/server/\n"
$cacert_path = "${java_home_path}/lib/security/cacerts"
}
}
default: {
fail('Error: Unknown Java Version. Supported java versions are : ( 8 | 11 )')
Expand Down
25 changes: 20 additions & 5 deletions manifests/install_java.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
$jdk_version_splitted = split($jdk_version, 'u')
$jdk_version_major = $jdk_version_splitted[0]
$jdk_version_update = $jdk_version_splitted[1]
# Support of different JDK8 versions with different binary pathes
if Integer($jdk_version_update) >= 371 {
# Support of different JDK8 versions with different binary patches
if Integer($jdk_version_update) >= 421 {
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}.0_${jdk_version_update}-oracle-x64"
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
} elsif Integer($jdk_version_update) >= 371 and Integer($jdk_version_update) < 421 {
$java_home_path = "/usr/lib/jvm/jdk-1.${jdk_version_major}-oracle-x64"
$libjvm_content_path = "${java_home_path}/jre/lib/amd64/server/\n"
$cacert_path = "${java_home_path}/jre/lib/security/cacerts"
Expand All @@ -63,9 +67,20 @@
# to receive JDK version 11.0.9
$jdk_version_raw = split($jdk_filename_splitted[1], '_')
$jdk_version = $jdk_version_raw[0]
$java_home_path = "/usr/java/jdk-${jdk_version}"
$libjvm_content_path = "${java_home_path}/lib/server/\n"
$cacert_path = "${java_home_path}/lib/security/cacerts"
$jdk_version_splitted = split($jdk_version, '\.') # 11.0.9
$jdk_version_major = $jdk_version_splitted[0]
$jdk_version_minor = $jdk_version_splitted[1]
$jdk_version_patch = $jdk_version_splitted[2]
# Support of different JDK8 versions with different binary patches
if Integer($jdk_version_patch) >= 24 {
$java_home_path = "/usr/lib/jvm/jdk-${jdk_version}-oracle-x64"
$libjvm_content_path= "${java_home_path}/lib/server/\n"
$cacert_path = "${java_home_path}/lib/security/cacerts"
} else {
$java_home_path = "/usr/java/jdk-${jdk_version}"
$libjvm_content_path= "${java_home_path}/lib/server/\n"
$cacert_path = "${java_home_path}/lib/security/cacerts"
}
}
default: {
fail('Error: Unknown Java Version. Supported java versions are : ( 8 | 11 )')
Expand Down

0 comments on commit 36392eb

Please sign in to comment.