maven/0001-adapt-mvn-script.patch

61 lines
1.6 KiB
Diff
Raw Normal View History

2020-05-25 10:50:41 +00:00
From 405e23d53b66a688082ed8c22385c5174e212be4 Mon Sep 17 00:00:00 2001
2017-04-18 15:11:32 +00:00
From: Michael Simacek <msimacek@redhat.com>
2020-05-25 10:50:41 +00:00
Date: Mon, 25 May 2020 12:10:33 +0200
Subject: [PATCH 1/4] adapt mvn script
2017-04-18 15:11:32 +00:00
---
2019-10-16 12:30:07 +00:00
apache-maven/src/bin/mvn | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
2017-04-18 15:11:32 +00:00
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
2020-05-25 10:50:41 +00:00
index a554c66..0c07ba6 100644
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.
# 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,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
. /etc/mavenrc
fi
+ if [ -f /etc/java/maven.conf ] ; then
+ . /etc/java/maven.conf
+ fi
+
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
+if [ -f /usr/share/java-utils/java-functions ] ; then
+ . /usr/share/java-utils/java-functions
+ set_jvm
+ set_javacmd
+fi
+export JAVA_HOME
+export JAVACMD
+
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
mingw=false;
@@ -63,7 +75,8 @@ done
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`
--
2020-05-25 10:50:41 +00:00
2.26.2
2017-04-18 15:11:32 +00:00