From d13c777c233df8e17081a997d081e7b8cf791fd022ee9a55fa93dd353b625df4 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 11 May 2023 09:05:51 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven?expand=0&rev=70 --- 0001-Adapt-mvn-script.patch | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/0001-Adapt-mvn-script.patch b/0001-Adapt-mvn-script.patch index 129ee24..c5107db 100644 --- a/0001-Adapt-mvn-script.patch +++ b/0001-Adapt-mvn-script.patch @@ -11,24 +11,7 @@ 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 -@@ -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_ARGS (Optional) Arguments passed to Maven before CLI arguments. - # MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. - # MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. -@@ -30,20 +30,22 @@ - - if [ -z "$MAVEN_SKIP_RC" ] ; then - -- if [ -f /usr/local/etc/mavenrc ] ; then -- . /usr/local/etc/mavenrc -- fi -- - if [ -f /etc/mavenrc ] ; then +@@ -37,12 +37,24 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then . /etc/mavenrc fi @@ -42,12 +25,18 @@ index a3004f917..052df8f0c 100755 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; -@@ -68,7 +70,8 @@ done +@@ -67,7 +79,8 @@ done saveddir=`pwd` @@ -57,7 +46,7 @@ index a3004f917..052df8f0c 100755 # make it fully qualified MAVEN_HOME=`cd "$MAVEN_HOME" && pwd` -@@ -106,7 +109,7 @@ if [ ! -x "$JAVACMD" ] ; then +@@ -105,7 +118,7 @@ if [ ! -x "$JAVACMD" ] ; then exit 1 fi