This bug was initially created as a copy of Bug #2162308
I am copying this bug because:
It was found that this bug also affects RHEL 9
+++ This bug was initially created as a clone of Bug #1991521 +++
Description of problem:
The point of the maven-openjdk17 metapackage is to permit Maven to be installed and have its dependencies satisfied by OpenJDK 17. See the cloned bug for initial work on that.
The maven-libs package depends on java-headless | java-11-headless. Neither are provided by OpenJDK 17 (see 2080229 for discussion on that), and so maven-libs forces the installation of OpenJDK 8 or 11.
A fix would be to adjust the maven-libs dependency to be
dependency: (java-headless or java-11-headless or java-17-headless)
Version-Release number of selected component (if applicable):
1:3.6.2-7.module+el8.6.0+13337+afcb49ec.noarch
How reproducible:
Always
Steps to Reproduce:
1. microdnf install maven-openjdk17
2. rpm -qa java-*
Actual results:
java-11-openjdk-...
java-11-openjdk-headless-...
java-17-openjdk-...
java-17-openjdk-headless-...
Expected results:
java-17-openjdk-...
java-17-openjdk-headless-...
Additional info:
It'd be great to finally be able to install maven with any of the redhat-provided OpenJDK versions without pulling in a spare JDK as well. This is a major pain for the containers.
Pre-verification:
MR is a valid change to fix the issue.
Tests (/Sanity/openjdk-packages) were added and check for absence of java packages of different versions.
Tests passed.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (maven bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2402