pkgsrc/devel/apache-maven/patches/patch-bin_mvn

36 lines
1 KiB
Text

$NetBSD: patch-bin_mvn,v 1.2 2013/05/18 05:37:03 markd Exp $
Follow pkgsrc path convention.
--- bin/mvn.orig 2013-02-19 13:54:21.000000000 +0000
+++ bin/mvn
@@ -69,6 +69,15 @@ if [ -z "$JAVA_HOME" ] ; then
fi
fi
+if [ "$JAVA_HOME" = "" ] ; then
+ JAVA_HOME=@JAVA_HOME@
+fi
+
+if [ "$M2_HOME" = "" ] ; then
+ # try to find maven
+ M2_HOME=@PREFIX@
+fi
+
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
@@ -166,7 +175,9 @@ fi
exec "$JAVACMD" \
$MAVEN_OPTS \
- -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
- "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
+ -classpath "${M2_HOME}"/lib/java/maven/boot/plexus-classworlds-*.jar \
+ "-Dclassworlds.conf=@SYSCONFDIR@/m2.conf" \
"-Dmaven.home=${M2_HOME}" \
- ${CLASSWORLDS_LAUNCHER} "$@"
\ No newline at end of file
+ "-Dorg.apache.maven.global-settings=@SYSCONFDIR@/settings.xml" \
+ "-Dorg.apache.maven.global-plugin-registry=@SYSCONFDIR@/plugin-registry.xml" \
+ ${CLASSWORLDS_LAUNCHER} "$@"