|
|
cebd45 |
From 056c94f86450c7c27f5bb11f98653c73bfe3d8e4 Mon Sep 17 00:00:00 2001
|
|
|
cebd45 |
From: Michael Simacek <msimacek@redhat.com>
|
|
|
cebd45 |
Date: Wed, 1 Feb 2017 14:54:26 +0100
|
|
|
cebd45 |
Subject: [PATCH 1/4] Adapt mvn script
|
|
|
cebd45 |
|
|
|
cebd45 |
---
|
|
|
cebd45 |
apache-maven/src/bin/mvn | 17 +++++++++++++++--
|
|
|
cebd45 |
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
|
cebd45 |
|
|
|
cebd45 |
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
|
|
|
cebd45 |
index a554c6617..0c07ba6e2 100755
|
|
|
cebd45 |
--- a/apache-maven/src/bin/mvn
|
|
|
cebd45 |
+++ b/apache-maven/src/bin/mvn
|
|
|
cebd45 |
@@ -22,7 +22,7 @@
|
|
|
cebd45 |
#
|
|
|
cebd45 |
# Environment Variable Prerequisites
|
|
|
cebd45 |
#
|
|
|
cebd45 |
-# JAVA_HOME Must point at your Java Development Kit installation.
|
|
|
cebd45 |
+# JAVA_HOME (Optional) Must point at your Java Development Kit installation.
|
|
|
cebd45 |
# MAVEN_OPTS (Optional) Java runtime options used when Maven is executed.
|
|
|
cebd45 |
# MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files.
|
|
|
cebd45 |
# -----------------------------------------------------------------------------
|
|
|
cebd45 |
@@ -33,12 +33,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
|
|
|
cebd45 |
. /etc/mavenrc
|
|
|
cebd45 |
fi
|
|
|
cebd45 |
|
|
|
cebd45 |
+ if [ -f /etc/java/maven.conf ] ; then
|
|
|
cebd45 |
+ . /etc/java/maven.conf
|
|
|
cebd45 |
+ fi
|
|
|
cebd45 |
+
|
|
|
cebd45 |
if [ -f "$HOME/.mavenrc" ] ; then
|
|
|
cebd45 |
. "$HOME/.mavenrc"
|
|
|
cebd45 |
fi
|
|
|
cebd45 |
|
|
|
cebd45 |
fi
|
|
|
cebd45 |
|
|
|
cebd45 |
+if [ -f /usr/share/java-utils/java-functions ] ; then
|
|
|
cebd45 |
+ . /usr/share/java-utils/java-functions
|
|
|
cebd45 |
+ set_jvm
|
|
|
cebd45 |
+ set_javacmd
|
|
|
cebd45 |
+fi
|
|
|
cebd45 |
+export JAVA_HOME
|
|
|
cebd45 |
+export JAVACMD
|
|
|
cebd45 |
+
|
|
|
cebd45 |
# OS specific support. $var _must_ be set to either true or false.
|
|
|
cebd45 |
cygwin=false;
|
|
|
cebd45 |
mingw=false;
|
|
|
cebd45 |
@@ -63,7 +75,8 @@ done
|
|
|
cebd45 |
|
|
|
cebd45 |
saveddir=`pwd`
|
|
|
cebd45 |
|
|
|
cebd45 |
-MAVEN_HOME=`dirname "$PRG"`/..
|
|
|
cebd45 |
+MAVEN_HOME="${_FEDORA_MAVEN_HOME:-`dirname "$PRG"`/..}"
|
|
|
cebd45 |
+unset _FEDORA_MAVEN_HOME
|
|
|
cebd45 |
|
|
|
cebd45 |
# make it fully qualified
|
|
|
cebd45 |
MAVEN_HOME=`cd "$MAVEN_HOME" && pwd`
|
|
|
cebd45 |
--
|
|
|
cebd45 |
2.21.0
|
|
|
cebd45 |
|