Unsetting M2_HOME if it's defined.

pull/165/head
Nils Winkler 2012-10-22 14:24:25 +02:00
parent 33f60925bd
commit 1673db9c06
1 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,12 @@ usemvn ()
done
echo ""
else
# Undefine M2_HOME if it is defined, as it gets in the way. Use MAVEN_HOME instead, which works for both Maven 2 and 3.
if [ -n "$M2_HOME" ]
then
unset M2_HOME
fi
if [ -z "$MAVEN_HOME" ]
then
export PATH=$MAVEN_INSTALL_ROOT/apache-maven-$1/bin:$PATH