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 1897375 - maven latest upgrade introduced hard dependency on /etc/java/maven.conf
Summary: maven latest upgrade introduced hard dependency on /etc/java/maven.conf
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: maven-3.6-module
Version: 8.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.4
Assignee: Mikolaj Izdebski
QA Contact: Martin Kyral
Depends On:
TreeView+ depends on / blocked
Reported: 2020-11-12 21:45 UTC by Tuomo Soini
Modified: 2021-05-18 15:56 UTC (History)
5 users (show)

Fixed In Version: maven-3.6-8040020201224090117.14342f08
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-05-18 15:56:32 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:1897 0 None None None 2021-05-18 15:56:34 UTC

Description Tuomo Soini 2020-11-12 21:45:46 UTC
Description of problem:

maven:3.6 maven package upgrade removed dependency on javapackage-tools but accidentally test for exitence of /etc/java/maven.conf was removed and now maven-lib actually requires /etc/java/maven.conf.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

/usr/share/maven/bin/mvn: line 36: /etc/java/maven.conf: No such file or directory

Expected results:

/usr/share/maven/bin/mvn to work...

Additional info:


This part of the change causes hard dependency on /etc/java/maven.conf

- +  if [ -f /etc/java/maven.conf ] ; then
+ +  . /etc/java/maven.conf
- +    . /etc/java/maven.conf
- +  fi 

Either this should be reverted or Necessary require is needed in maven-lib package. If that's the fix you want it would be:

Requires: maven-jdk-binding = %{epoch}:%{version}-%{release}


Requires: /etc/java/maven.conf

Comment 1 Mikolaj Izdebski 2020-11-18 08:20:11 UTC
Thank you for taking the time to report this issue to us. We appreciate the feedback and use reports such as this one to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to guarantee the timeliness or suitability of a resolution.

If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please visit:

I can reproduce the issue with:
# podman run -it registry.access.redhat.com/ubi8
# dnf -y module enable maven:3.6
# dnf -y install maven-lib
# /usr/share/maven/bin/mvn -v
/usr/share/maven/bin/mvn: line 36: /etc/java/maven.conf: No such file or directory

However, as maven-lib description says, it is expected to be used as a library only:
# rpm -qi maven-lib
Description: Core part of Apache Maven that can be used as a library.

Also, maven-lib does not provide mvn command in /usr/bin either, and we have not considered using it the above way as a valid use case for maven-lib.
For use of Maven from command-line, the full maven package should be insalled.
We should move /usr/share/maven/bin/mvn script from maven-lib to maven to make this more obvious.
And I can confirm that installing full maven with "dnf install maven" fixes the above issue with missing config file.

I will keep this bug open for moving the internal mvn shell script /usr/share/maven/bin/mvn from maven-lib to maven package.

Comment 13 errata-xmlrpc 2021-05-18 15:56:32 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.6 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.


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