MNG-4226: Detect JAVA_HOME on newer Mac OS X

Submitted by: Christopher Tubbs <ctubbsii@apache.org>
https://github.com/apache/maven/pull/11
This commit is contained in:
Jason van Zyl 2014-05-20 20:48:57 -04:00
parent bef7fac6e3
commit 65863e0a28
1 changed files with 7 additions and 0 deletions

View File

@ -78,6 +78,13 @@ case "`uname`" in
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi
if [[ -z "$JAVA_HOME" && -x /usr/libexec/java_home ]] ; then
#
# Apple JDKs
#
export JAVA_HOME=$(/usr/libexec/java_home)
fi
;;
esac