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 2164437 - maven:3.6 should not pull in more than one Java version
Summary: maven:3.6 should not pull in more than one Java version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: maven
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Mikolaj Izdebski
QA Contact: Martin Kyral
URL:
Whiteboard:
: 2101289 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-25 14:47 UTC by Marián Konček
Modified: 2023-05-09 09:23 UTC (History)
3 users (show)

Fixed In Version: javapackages-tools-6.0.0-4.el9 apache-commons-cli-1.4-17.el9 apache-commons-codec-1.15-7.el9 apache-commons-io-2.8.0-8.el9 apache-commons-lang3-3.12.0-6.el9 atinject-1.0.3-6.el9 cdi-api-2.0.2-6.el9 google-guice-4.2.3-9.el9 guava-30.1-6.el9 httpcomponents-client-4.5.13-3.el9 httpcomponents-core-4.4.13-7.el9 jakarta-annotations-1.3.5-13.el9 jansi-2.3.3-6.el9 jsr-305-3.0.2-6.el9 maven-resolver-1.6.1-10.el9 maven-shared-utils-3.3.4-3.el9 maven-wagon-3.4.2-7.el9 plexus-cipher-1.7-27.el9 plexus-classworlds-2.6.0-11.el9 plexus-containers-2.1.0-10.el9 plexus-interpolation-1.26-11.el9 plexus-sec-dispatcher-1.4-37.el9 plexus-utils-3.3.0-10.el9 sisu-0.3.4-10.el9 slf4j-1.7.30-13.el9 jsoup-1.13.1-10.el9 maven-3.6.3-15.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:53:24 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-146413 0 None None None 2023-01-25 14:49:01 UTC
Red Hat Product Errata RHBA-2023:2402 0 None None None 2023-05-09 07:53:27 UTC

Description Marián Konček 2023-01-25 14:47:09 UTC
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.

Comment 3 Mikolaj Izdebski 2023-01-30 18:59:27 UTC
Now that requires generator in javapackages-tools has been updated,
all packages maven depends on must be rebuilt to have auto-requires regenerated.

More merge requests opened:
https://gitlab.com/redhat/centos-stream/rpms/apache-commons-cli/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/apache-commons-codec/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/apache-commons-io/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/apache-commons-lang3/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/atinject/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/cdi-api/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/google-guice/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/guava/-/merge_requests/10
https://gitlab.com/redhat/centos-stream/rpms/httpcomponents-client/-/merge_requests/10
https://gitlab.com/redhat/centos-stream/rpms/httpcomponents-core/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/jakarta-annotations/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/jansi/-/merge_requests/14
https://gitlab.com/redhat/centos-stream/rpms/jsr-305/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/maven/-/merge_requests/16
https://gitlab.com/redhat/centos-stream/rpms/maven-resolver/-/merge_requests/11
https://gitlab.com/redhat/centos-stream/rpms/maven-shared-utils/-/merge_requests/10
https://gitlab.com/redhat/centos-stream/rpms/maven-wagon/-/merge_requests/10
https://gitlab.com/redhat/centos-stream/rpms/plexus-cipher/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/plexus-classworlds/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/plexus-containers/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/plexus-interpolation/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/plexus-sec-dispatcher/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/plexus-utils/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/sisu/-/merge_requests/9
https://gitlab.com/redhat/centos-stream/rpms/slf4j/-/merge_requests/9

Comment 4 Mikolaj Izdebski 2023-01-30 19:13:30 UTC
All the above merge requests have been merged.

Comment 7 Mikolaj Izdebski 2023-01-31 08:09:02 UTC
*** Bug 2101289 has been marked as a duplicate of this bug. ***

Comment 8 Mikolaj Izdebski 2023-02-02 07:52:09 UTC
Note regarding verification and test coverage:
This bug is covered by /Sanity/openjdk-packages test that checks
whether only a single expected version of OpenJDK is installed.
https://src.fedoraproject.org/tests/maven/blob/main/f/Sanity/openjdk-packages

Comment 10 Marián Konček 2023-02-02 16:05:01 UTC
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.

Comment 15 errata-xmlrpc 2023-05-09 07:53:24 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 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


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