Skip to content

Commit 6ef4de5

Browse files
authored
Added support for Java 24 (#400)
The latest non-LTS release. Java 21 remains the default JDK.
1 parent 1a9a02b commit 6ef4de5

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ are shown below):
5252

5353
```yaml
5454
# Java version number
55-
# Specify '8', '11', '17', '21' or '23' to get the latest patch version of that
55+
# Specify '8', '11', '17', '21' or '24' to get the latest patch version of that
5656
# release.
5757
java_version: '21.0.6+7'
5858

@@ -126,7 +126,7 @@ You can install a specific version of the JDK by specifying the `java_version`.
126126
running the following command:
127127

128128
```bash
129-
for i in 23 21 17 11 8; do (curl --silent http \
129+
for i in 24 21 17 11 8; do (curl --silent http \
130130
"https://api.adoptium.net/v3/info/release_names?version=%5B$i,$(($i + 1)))\
131131
&release_type=ga" | jq --raw-output '.releases[]' | sed -E 's/^jdk\-?//'); done
132132
```

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# code: language=ansible
22
---
33
# Java version number
4-
# Specify '8', '11', '17', '21' or '23' to get the latest patch version of that
4+
# Specify '8', '11', '17', '21' or '24' to get the latest patch version of that
55
# release.
66
java_version: '21.0.6+7'
77

molecule/java-max-non-lts-offline/converge.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
- name: Download JDK for offline install
2828
ansible.builtin.get_url:
29-
url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-23.0.1+11' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204
30-
dest: '{{ java_local_archive_dir }}/OpenJDK23-jdk_x64_linux_hotspot_23.0.1_11.tar.gz'
29+
url: "https://api.adoptium.net/v3/binary/version/{{ 'jdk-24+36' | urlencode }}/linux/x64/jdk/hotspot/normal/adoptium?project=jdk" # noqa 204
30+
dest: '{{ java_local_archive_dir }}/OpenJDK23-jdk_x64_linux_hotspot_24_36.tar.gz'
3131
force: false
3232
timeout: '{{ java_download_timeout_seconds }}'
3333
mode: 'u=rw,go=r'
@@ -36,11 +36,11 @@
3636
roles:
3737
- role: ansible-role-java
3838
java_use_local_archive: true
39-
java_major_version: '23'
40-
java_version: '23.0.1+11'
41-
java_release_name: 'jdk-23.0.1+11'
42-
java_redis_filename: 'OpenJDK23-jdk_x64_linux_hotspot_23.0.1_11.tar.gz'
43-
java_redis_sha256sum: '2400267e4e9c0f6ae880a4d763af6caf18c673714bdee5debf8388b0b5d52886'
39+
java_major_version: '24'
40+
java_version: '24+36'
41+
java_release_name: 'jdk-24+36'
42+
java_redis_filename: 'OpenJDK23-jdk_x64_linux_hotspot_24_36.tar.gz'
43+
java_redis_sha256sum: 'c340dee97b6aa215d248bc196dcac5b56e7be9b5c5d45e691344d40d5d0b171d'
4444

4545
post_tasks:
4646
- name: Verify java facts

molecule/java-max-non-lts-online/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
roles:
2121
- role: ansible-role-java
22-
java_version: '23'
22+
java_version: '24'
2323
java_use_local_archive: false
2424

2525
post_tasks:

molecule/java-max-non-lts/tests/test_role.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_java(host):
88
m = re.search('(?:java|openjdk) version "([0-9]+)', cmd.stderr)
99
assert m is not None
1010
java_version = m.group(1)
11-
assert '23' == java_version
11+
assert '24' == java_version
1212

1313

1414
def test_javac(host):
@@ -17,11 +17,11 @@ def test_javac(host):
1717
m = re.search('javac ([0-9]+)', cmd.stdout)
1818
assert m is not None
1919
java_version = m.group(1)
20-
assert '23' == java_version
20+
assert '24' == java_version
2121

2222

2323
@pytest.mark.parametrize('version_dir_pattern', [
24-
'jdk-23(\\.[0-9]+\\.[0-9]+)?(\\+[0-9]+)?$'
24+
'jdk-24(\\.[0-9]+\\.[0-9]+)?(\\+[0-9]+)?$'
2525
])
2626
def test_java_installed(host, version_dir_pattern):
2727

0 commit comments

Comments
 (0)