maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject [31/50] git commit: MNG-5376: Account for changes between the Apple and Oracle JDKs on OSX
Date Mon, 18 Mar 2013 21:47:28 GMT
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


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/074667f2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/074667f2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/074667f2

Branch: refs/heads/master
Commit: 074667f20fe037550263ffd64ff5064dca5b330f
Parents: b5eee08
Author: Jason van Zyl <jvanzyl@apache.org>
Authored: Thu Nov 22 02:24:16 2012 +0000
Committer: Jason van Zyl <jvanzyl@apache.org>
Committed: Thu Nov 22 02:24:16 2012 +0000

----------------------------------------------------------------------
 apache-maven/src/bin/mvn |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/074667f2/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 04c292f..6dd9d5e 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -54,12 +54,24 @@ case "`uname`" in
   CYGWIN*) cygwin=true ;;
   MINGW*) mingw=true;;
   Darwin*) darwin=true 
-           if [ -z "$JAVA_VERSION" ] ; then
-             JAVA_VERSION="CurrentJDK"
-           fi
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           
+           #
+           # 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" && -L "/Library/Java/JavaVirtualMachines/CurrentJDK"
]] ; then
+               #
+               # Oracle JDKs
+               #
+               JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
+           fi           
            ;;
 esac
 


Mime
View raw message