Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JDK Support #292

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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