2023-03-21 08:40:58 +00:00
|
|
|
From abda3bfec41730810ee98e685b128f27ddc24c36 Mon Sep 17 00:00:00 2001
|
2017-04-18 15:11:32 +00:00
|
|
|
From: Michael Simacek <msimacek@redhat.com>
|
|
|
|
Date: Wed, 1 Feb 2017 14:54:26 +0100
|
2023-03-21 08:40:58 +00:00
|
|
|
Subject: [PATCH 1/3] Adapt mvn script
|
2017-04-18 15:11:32 +00:00
|
|
|
|
|
|
|
---
|
2023-03-21 08:40:58 +00:00
|
|
|
apache-maven/src/bin/mvn | 15 +++++++++------
|
|
|
|
1 file changed, 9 insertions(+), 6 deletions(-)
|
2017-04-18 15:11:32 +00:00
|
|
|
|
|
|
|
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
|
2023-03-21 08:40:58 +00:00
|
|
|
index a3004f917..9b118717e 100755
|
2017-04-18 15:11:32 +00:00
|
|
|
--- a/apache-maven/src/bin/mvn
|
|
|
|
+++ b/apache-maven/src/bin/mvn
|
|
|
|
@@ -22,7 +22,7 @@
|
|
|
|
#
|
|
|
|
# Environment Variable Prerequisites
|
|
|
|
#
|
|
|
|
-# JAVA_HOME Must point at your Java Development Kit installation.
|
|
|
|
+# JAVA_HOME (Optional) Must point at your Java Development Kit installation.
|
2023-03-21 08:40:58 +00:00
|
|
|
# MAVEN_ARGS (Optional) Arguments passed to Maven before CLI arguments.
|
2017-04-18 15:11:32 +00:00
|
|
|
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
|
|
|
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
2023-03-21 08:40:58 +00:00
|
|
|
@@ -30,20 +30,22 @@
|
|
|
|
|
|
|
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
|
|
|
|
|
|
|
- if [ -f /usr/local/etc/mavenrc ] ; then
|
|
|
|
- . /usr/local/etc/mavenrc
|
|
|
|
- fi
|
|
|
|
-
|
|
|
|
if [ -f /etc/mavenrc ] ; then
|
2017-04-18 15:11:32 +00:00
|
|
|
. /etc/mavenrc
|
|
|
|
fi
|
|
|
|
|
2021-11-05 09:39:28 +00:00
|
|
|
+ if [ -z "$JAVA_HOME" ] ; then
|
2023-12-13 06:54:33 +00:00
|
|
|
+ . /etc/java/maven@{maven_version_suffix}.conf
|
2021-11-05 09:39:28 +00:00
|
|
|
+ fi
|
2017-04-18 15:11:32 +00:00
|
|
|
+
|
|
|
|
if [ -f "$HOME/.mavenrc" ] ; then
|
|
|
|
. "$HOME/.mavenrc"
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
+export JAVA_HOME
|
|
|
|
+
|
|
|
|
# OS specific support. $var _must_ be set to either true or false.
|
|
|
|
cygwin=false;
|
|
|
|
mingw=false;
|
2023-03-21 08:40:58 +00:00
|
|
|
@@ -68,7 +70,8 @@ done
|
2017-04-18 15:11:32 +00:00
|
|
|
|
|
|
|
saveddir=`pwd`
|
|
|
|
|
|
|
|
-MAVEN_HOME=`dirname "$PRG"`/..
|
|
|
|
+MAVEN_HOME="${_FEDORA_MAVEN_HOME:-`dirname "$PRG"`/..}"
|
|
|
|
+unset _FEDORA_MAVEN_HOME
|
|
|
|
|
|
|
|
# make it fully qualified
|
|
|
|
MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
|
|
|
|
--
|
2023-03-21 08:40:58 +00:00
|
|
|
2.39.2
|
2017-04-18 15:11:32 +00:00
|
|
|
|