RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2101289 - maven-lib package drags java-11-openjdk-headles as a dependency in purely java-17-* env
Summary: maven-lib package drags java-11-openjdk-headles as a dependency in purely jav...
Keywords:
Status: CLOSED DUPLICATE of bug 2164437
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: maven
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 9.2
Assignee: Mikolaj Izdebski
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-27 04:17 UTC by Marcin Skarbek
Modified: 2023-01-31 08:09 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-31 08:09:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-126316 0 None None None 2022-06-27 04:28:59 UTC

Description Marcin Skarbek 2022-06-27 04:17:27 UTC
Description of problem:
Trying to install Maven using `dnf install maven maven-openjdk17` on a host that previously had only installed java-17-openjdk-devel, so doesn't have java-11-* nor java-1.8.0-* causes additional installation of java-11-openjdk-headles as a dependency of maven-lib package.

Version-Release number of selected component (if applicable):
maven - 3.6.3-14.el9

How reproducible:
Each time

Steps to Reproduce:
1. Get clean minimal RHEL 9.0 installation
2. Install OpenJDK 17 - dnf install java-17-openjdk-devel 
3. Install Maven - dnf install maven maven-openjdk17

Actual results:
dnf installs additionally java-11-openjdk-headless

Expected results:
java-17-openjdk-headless is a sufficient dependency for maven

Additional info:

Comment 1 Mikolaj Izdebski 2022-08-18 06:27:26 UTC
Confirmed. Thank you for the report.

Reproducer: 
# podman run -it registry.access.redhat.com/ubi9
# dnf -y install maven-openjdk17
# rpm -e java-11-openjdk-headless
(java-headless or java-11-headless) is needed by (installed) plexus-utils-3.3.0-9.el9.noarch
...

Scope of the change:
- update javapackages-generators to generate requires on (java-headless or java-11-headless or java-17-headless)
- rebuild maven and its runtime dependencies to have new requires generated

Automated regression tests need to be implemented for all JDK versions - 8, 11, 17.

Comment 3 Mikolaj Izdebski 2022-08-19 04:49:18 UTC
Automated test /smoke/ensure-single-jdk has been implemented and committed in Fedora:
https://src.fedoraproject.org/rpms/maven/c/9cf3d9a

Comment 4 Mikolaj Izdebski 2023-01-26 10:32:56 UTC
Test has been committed to CentOS Stream 9:
https://gitlab.com/redhat/centos-stream/rpms/maven/-/commit/868c483a7fa3c14630185da1f70978521d17074e

Comment 5 Mikolaj Izdebski 2023-01-31 08:09:02 UTC

*** This bug has been marked as a duplicate of bug 2164437 ***


Note You need to log in before you can comment on or make changes to this bug.