Clean up Java installation
I got this message while running the test suite recently:
The
java-17-openjdkpackage is deprecated and may no longer receive updates. Since f42 installadoptium-temurin-java-repositoryand installtemurin-17-jre
https://fedoraproject.org/wiki/Changes/ThirdPartyLegacyJdks#adoptium-temurin-java-repository
We could install Eclipse Temurin rather than getting Java from the distribution. The precise manner in which this would be implemented would vary by distribution. That would be a change from how we do things today, where we install Java from the distribution.
Alternatively, we could stop trying to install an older Java LTS and install the latest Java LTS supported by each distribution. That might vary by distribution as well (e.g., newer distribution releases might carry newer Java LTS releases). That would also be a change from today, where we try to install Java 17 across all distributions (except for Fedora 41, where only Java 21 is available).
I have no strong preference as to which choice is made. To the implementer goes the decision. Whoever is doing the work can choose the implementation that makes the most sense.
Fedora is phasing out their old Java 17 package (java-17-openjdk) and recommending we switch to Eclipse Temurin instead. It's like when your favorite coffee shop stops selling your usual blend and points you to a better supplier.
The solution for this is Switch to Eclipse Temurin:
# First add the Temurin repository
sudo dnf install -y adoptium-temurin-java-repository
# Then install Java 17
sudo dnf install -y temurin-17-jre
Why using this solution because: It's like getting your coffee straight from the roaster - better quality and more reliable
You won't need to change your code
could you please assign this issue to me??I wanna solve it!
Thanks for proposing, @Mujib-Ahasan . We don't assign issues in the Jenkins community. Feel free to experiment and propose a Pull Request when you're ready.
Alright!! Thank you so much!
Hey @gounthar , I'm working on this. could you please confirm if the Java installation is handled inside this repo??If yes, then where should I focus on?
Yes, the Java installation is handled inside this repository. You should focus on the following files for Java installation:
molecule/default/install-rpm.yml: This file installs different Java packages based on the distribution:- java-17-openjdk for most distributions except Amazon and CentOS 10.
- java-17-amazon-corretto for Amazon distributions.
- java-21-openjdk for CentOS 10.
molecule/default/install-suse.yml: This file installsjava-17-openjdkalong with other packages for SUSE distributions.molecule/default/install-deb.yml: This file installsopenjdk-17-jrefor Debian-based distributions.
These files use Ansible to manage package installations, ensuring that the appropriate Java version is installed based on the operating system and its version.
is this issue open now??
Yes
thanks @lemeurherveCB for confirming I'll start analyzing and propose a cleanup plan before submitting a PR