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