mirror of https://git.FreeBSD.org/ports.git
Browse Source
- Submitter changes MAINTAINER to his @apache.org address - Bump version to 2 - Use ETCDIR wherever possible - Also install mvnDebug - Burry long dead M2_HOME in favor of MAVEN_HOME which will *never* be propagated PR: 265028, 265025main
5 changed files with 20 additions and 61 deletions
@ -1,7 +1,7 @@
|
||||
The maven-wrapper provides a convenient way to switch between several Maven |
||||
installations. |
||||
|
||||
- By setting the M2_HOME environment variable the user can select the Maven |
||||
- By setting the MAVEN_HOME environment variable the user can select the Maven |
||||
instance to use. |
||||
- A default Maven instance is selected according to the files in |
||||
/usr/local/etc/maven/instances.d/ |
||||
/usr/local/etc/maven-wrapper/instances.d/ |
||||
|
@ -1,2 +1,3 @@
|
||||
bin/mvn |
||||
@dir etc/maven-wrapper/instances.d |
||||
bin/mvnDebug |
||||
@dir %%ETCDIR%%/instances.d |
||||
|
@ -1,46 +0,0 @@
|
||||
#!/bin/sh |
||||
# |
||||
|
||||
if [ -f /etc/mavenrc ] ; then |
||||
. /etc/mavenrc |
||||
fi |
||||
|
||||
if [ -f "${HOME}/.mavenrc" ] ; then |
||||
. "${HOME}/.mavenrc" |
||||
fi |
||||
|
||||
M2_HOME=${M2_HOME:-"%%DATADIR%%"} |
||||
|
||||
# traverses directory structure from process work directory to filesystem root |
||||
# first directory with .mvn subdirectory is considered project base directory |
||||
find_maven_basedir() |
||||
{ |
||||
local basedir=$(pwd) |
||||
local wdir=$(pwd) |
||||
while [ "$wdir" != '/' ] ; do |
||||
wdir=$(cd "$wdir/.."; pwd) |
||||
if [ -d "$wdir"/.mvn ] ; then |
||||
basedir=$wdir |
||||
break |
||||
fi |
||||
done |
||||
echo "${basedir}" |
||||
} |
||||
|
||||
# concatenates all lines of a file |
||||
concat_lines() |
||||
{ |
||||
if [ -f "$1" ]; then |
||||
echo "$(tr -s '\n' ' ' < "$1")" |
||||
fi |
||||
} |
||||
|
||||
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} |
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
||||
|
||||
exec "%%LOCALBASE%%/bin/java" $MAVEN_OPTS \ |
||||
-classpath "${M2_HOME}/boot/%%CLASSWORLDS_JAR%%" \ |
||||
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ |
||||
"-Dmaven.home=${M2_HOME}" \ |
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
||||
org.codehaus.classworlds.Launcher "$@" |
Loading…
Reference in new issue