You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2014/05/21 02:50:14 UTC
git commit: MNG-4226: Detect JAVA_HOME on newer Mac OS X Submitted
by: Christopher Tubbs
https://github.com/apache/maven/pull/11
Repository: maven
Updated Branches:
refs/heads/master bef7fac6e -> 65863e0a2
MNG-4226: Detect JAVA_HOME on newer Mac OS X
Submitted by: Christopher Tubbs <ct...@apache.org>
https://github.com/apache/maven/pull/11
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/65863e0a
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/65863e0a
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/65863e0a
Branch: refs/heads/master
Commit: 65863e0a28298b6d95bfbbf7cc28953f6ba91f93
Parents: bef7fac
Author: Jason van Zyl <ja...@tesla.io>
Authored: Tue May 20 20:48:57 2014 -0400
Committer: Jason van Zyl <ja...@tesla.io>
Committed: Tue May 20 20:48:57 2014 -0400
----------------------------------------------------------------------
apache-maven/src/bin/mvn | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/65863e0a/apache-maven/src/bin/mvn
----------------------------------------------------------------------
diff --git a/apache-maven/src/bin/mvn b/apache-maven/src/bin/mvn
index 59efef3..c71ffe7 100755
--- a/apache-maven/src/bin/mvn
+++ b/apache-maven/src/bin/mvn
@@ -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