#!/bin/sh
##
##  maven.sh -- Maven 2 wrapper frontend
##

#   determine Java environment
export JAVA_PLATFORM="sun-jdk"
eval `@l_prefix@/bin/java-toolkit -e`

#   allow shell variable MAVEN_OPTS to be overridden
MAVEN_OPTS=""
if [ -f "@l_prefix@/etc/maven/mavenrc" ]; then
    . @l_prefix@/etc/maven/mavenrc
fi
if [ -f "$HOME/.mavenrc" ]; then
    . "$HOME/.mavenrc"
fi

#   execute Maven
exec @l_prefix@/bin/java \
    $MAVEN_OPTS \
    -classpath @l_prefix@/libexec/maven/plexus-classworlds-*.jar \
    -Dclassworlds.conf=@l_prefix@/etc/maven/maven.conf \
    -Dorg.apache.maven.global-settings=@l_prefix@/etc/maven/settings.xml \
    -Dmaven.home=@l_prefix@ \
    -Djava.awt.headless=true \
    org.codehaus.plexus.classworlds.launcher.Launcher \
    ${1+"$@"}

