Do not override JAVA_HOME set by user

This commit is contained in:
Mikolaj Izdebski 2021-11-05 10:39:28 +01:00
parent bed171b58d
commit 8d83558ae2
2 changed files with 9 additions and 3 deletions

View File

@ -20,11 +20,13 @@ index a554c6617..739501af4 100755
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
# -----------------------------------------------------------------------------
@@ -33,12 +33,16 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
@@ -33,12 +33,18 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
. /etc/mavenrc
fi
+ . /etc/java/maven.conf
+ if [ -z "$JAVA_HOME" ] ; then
+ . /etc/java/maven.conf
+ fi
+
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"

View File

@ -7,7 +7,7 @@
Name: maven
Epoch: 1
Version: 3.6.3
Release: 13%{?dist}
Release: 14%{?dist}
Summary: Java project management and project comprehension tool
# maven itself is ASL 2.0
# bundled slf4j is MIT
@ -291,6 +291,10 @@ if [[ $1 -eq 0 ]]; then update-alternatives --remove mvn %{homedir}/bin/mvn; fi
%config %{_javaconfdir}/maven.conf-openjdk17
%changelog
* Fri Nov 05 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-14
- Do not override JAVA_HOME set by user
- Resolves: rhbz#2020478
* Tue Nov 02 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.6.3-13
- Suggest OpenJDK 17 as default Maven binding