mirror of https://github.com/apache/maven.git
MNG-5376: Account for changes between the Apple and Oracle JDKs on OSX
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1412409 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b5eee08e3f
commit
074667f20f
|
@ -54,11 +54,23 @@ case "`uname`" in
|
|||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
if [ -z "$JAVA_VERSION" ] ; then
|
||||
JAVA_VERSION="CurrentJDK"
|
||||
|
||||
#
|
||||
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
|
||||
# for the new JDKs provided by Oracle.
|
||||
#
|
||||
if [[ -z "$JAVA_HOME" && -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ]] ; then
|
||||
#
|
||||
# Apple JDKs
|
||||
#
|
||||
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||
fi
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
|
||||
|
||||
if [[ -z "$JAVA_HOME" && -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ]] ; then
|
||||
#
|
||||
# Oracle JDKs
|
||||
#
|
||||
JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue