forked from pool/maven
61 lines
1.5 KiB
Diff
61 lines
1.5 KiB
Diff
From 8d6b4651e2be6156322d27d7c8715601a6b11cd2 Mon Sep 17 00:00:00 2001
|
|
From: Michael Simacek <msimacek@redhat.com>
|
|
Date: Wed, 1 Feb 2017 14:54:26 +0100
|
|
Subject: [PATCH 1/4] Adapt mvn script
|
|
|
|
---
|
|
apache-maven/src/bin/mvn | 17 ++++++++++-------
|
|
1 file changed, 10 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
|
|
index a3004f917..052df8f0c 100755
|
|
--- a/apache-maven/src/bin/mvn
|
|
+++ b/apache-maven/src/bin/mvn
|
|
@@ -37,12 +37,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;
|
|
@@ -67,7 +79,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`
|
|
@@ -105,7 +118,7 @@ if [ ! -x "$JAVACMD" ] ; then
|
|
exit 1
|
|
fi
|
|
|
|
-CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar`
|
|
+CLASSWORLDS_JAR=`build-classpath plexus-classworlds`
|
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
|
|
|
# For Cygwin, switch paths to Windows format before running java
|
|
--
|
|
2.40.1
|
|
|