2017-02-01 14:08:45 +00:00
|
|
|
From 4c12151d239f98812ac77703a0e892197387699a Mon Sep 17 00:00:00 2001
|
2016-08-15 08:36:37 +00:00
|
|
|
From: Michael Simacek <msimacek@redhat.com>
|
2017-02-01 14:08:45 +00:00
|
|
|
Date: Wed, 1 Feb 2017 14:54:26 +0100
|
2016-08-15 08:36:37 +00:00
|
|
|
Subject: [PATCH 2/2] Adapt mvn script
|
|
|
|
|
|
|
|
---
|
2017-02-01 14:08:45 +00:00
|
|
|
apache-maven/src/bin/mvn | 22 ++++++++++++++++------
|
|
|
|
1 file changed, 16 insertions(+), 6 deletions(-)
|
2016-08-15 08:36:37 +00:00
|
|
|
|
|
|
|
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
|
2017-02-01 14:08:45 +00:00
|
|
|
index 6875628..3b87936 100755
|
2016-08-15 08:36:37 +00:00
|
|
|
--- a/apache-maven/src/bin/mvn
|
|
|
|
+++ b/apache-maven/src/bin/mvn
|
2017-02-01 14:08:45 +00:00
|
|
|
@@ -21,12 +21,9 @@
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Maven2 Start Up Batch script
|
2016-08-15 08:36:37 +00:00
|
|
|
#
|
2017-02-01 14:08:45 +00:00
|
|
|
-# Required ENV vars:
|
|
|
|
-# ------------------
|
|
|
|
-# JAVA_HOME - location of a JDK home dir
|
|
|
|
-#
|
|
|
|
# Optional ENV vars
|
|
|
|
# -----------------
|
|
|
|
+# JAVA_HOME - location of a JDK home dir
|
|
|
|
# M2_HOME - location of maven2's installed home dir
|
|
|
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
|
|
|
# e.g. to debug Maven itself, use
|
|
|
|
@@ -40,12 +37,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
|
2016-08-15 08:36:37 +00:00
|
|
|
. /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
|
|
|
|
+
|
2017-02-01 14:08:45 +00:00
|
|
|
# OS specific support. $var _must_ be set to either true or false.
|
2016-08-15 08:36:37 +00:00
|
|
|
cygwin=false;
|
2017-02-01 14:08:45 +00:00
|
|
|
darwin=false;
|
|
|
|
@@ -111,7 +120,8 @@ if [ -z "$M2_HOME" ] ; then
|
2016-08-15 08:36:37 +00:00
|
|
|
|
2017-02-01 14:08:45 +00:00
|
|
|
saveddir=`pwd`
|
2016-08-15 08:36:37 +00:00
|
|
|
|
2017-02-01 14:08:45 +00:00
|
|
|
- M2_HOME=`dirname "$PRG"`/..
|
|
|
|
+ M2_HOME="${_FEDORA_MAVEN_HOME:-`dirname "$PRG"`/..}"
|
|
|
|
+ unset _FEDORA_MAVEN_HOME
|
2016-08-15 08:36:37 +00:00
|
|
|
|
2017-02-01 14:08:45 +00:00
|
|
|
# make it fully qualified
|
|
|
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
|
|
|
@@ -238,7 +248,7 @@ export MAVEN_CMD_LINE_ARGS
|
|
|
|
exec "$JAVACMD" \
|
|
|
|
$MAVEN_OPTS \
|
|
|
|
$MAVEN_DEBUG_OPTS \
|
|
|
|
- -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
|
|
|
+ -classpath "$(build-classpath plexus-classworlds)" \
|
|
|
|
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
|
|
|
|
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
|
|
|
${CLASSWORLDS_LAUNCHER} "$@"
|
2016-08-15 08:36:37 +00:00
|
|
|
--
|
2017-02-01 14:08:45 +00:00
|
|
|
2.9.3
|
2016-08-15 08:36:37 +00:00
|
|
|
|