mvnw revision d69d2e025b2dbe63dda1853449f935e1efc2cd5d
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# ----------------------------------------------------------------------------
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# Licensed to the Apache Software Foundation (ASF) under one
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# or more contributor license agreements. See the NOTICE file
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# distributed with this work for additional information
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# regarding copyright ownership. The ASF licenses this file
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# to you under the Apache License, Version 2.0 (the
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# "License"); you may not use this file except in compliance
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# with the License. You may obtain a copy of the License at
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# Unless required by applicable law or agreed to in writing,
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# software distributed under the License is distributed on an
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# KIND, either express or implied. See the License for the
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# specific language governing permissions and limitations
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# under the License.
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# ----------------------------------------------------------------------------
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# ----------------------------------------------------------------------------
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# Maven2 Start Up Batch script
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# Required ENV vars:
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# ------------------
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# JAVA_HOME - location of a JDK home dir
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# Optional ENV vars
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# -----------------
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# M2_HOME - location of maven2's installed home dir
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# MAVEN_OPTS - parameters passed to the Java VM when running Maven
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# e.g. to debug Maven itself, use
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# ----------------------------------------------------------------------------
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllysif [ -z "$MAVEN_SKIP_RC" ] ; then
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys if [ -f "$HOME/.mavenrc" ] ; then
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys . "$HOME/.mavenrc"
0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02bwyllys# OS specific support. $var _must_ be set to either true or false.
mingw=false
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
if [ -z "$JAVA_HOME" ] ; then
if [ -z "$M2_HOME" ] ; then
while [ -h "$PRG" ] ; do
cd "$saveddir"
if $cygwin ; then
[ -n "$M2_HOME" ] &&
[ -n "$JAVA_HOME" ] &&
[ -n "$CLASSPATH" ] &&
if $mingw ; then
[ -n "$M2_HOME" ] &&
[ -n "$JAVA_HOME" ] &&
if [ -z "$JAVA_HOME" ]; then
if $darwin ; then
export JAVA_HOME
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
if [ ! -x "$JAVACMD" ] ; then
if [ -z "$JAVA_HOME" ] ; then
if $cygwin; then
[ -n "$M2_HOME" ] &&
[ -n "$JAVA_HOME" ] &&
[ -n "$CLASSPATH" ] &&
export MAVEN_CMD_LINE_ARGS
exec "$JAVACMD" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \