Bug 2164729

Summary: maven:3.8 should not pull in more than one Java version
Product: Red Hat Enterprise Linux 8 Reporter: Marián Konček <mkoncek>
Component: mavenAssignee: Marián Konček <mkoncek>
Status: CLOSED ERRATA QA Contact: Martin Kyral <mkyral>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.7CC: mizdebsk, mkyral
Target Milestone: pre-dev-freezeKeywords: Triaged
Target Release: 8.8Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: maven-3.8-8080020230202141436.1e199b36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 08:42:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marián Konček 2023-01-26 10:04:09 UTC
This bug was initially created as a copy of Bug #2162308

I am copying this bug because: 
The bug is present in stream 3.8 as well.


+++ 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.

Comment 2 Mikolaj Izdebski 2023-02-08 08:34:09 UTC
Pre-verified build maven-3.8-8080020230202141436.1e199b36
Change was commited to dist-git of javapackages-tools. Maven module was rebuilt.
Latest rpm of maven-lib has updated Requires fields.
Tests (/Sanity/openjdk-packages) were added and check for absence of java packages of different versions.
Tests passed.

Comment 7 errata-xmlrpc 2023-05-16 08:42:36 UTC
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:3.8 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:2904