ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1434680 - in /ant/core/trunk: WHATSNEW src/script/ant
Date Thu, 17 Jan 2013 14:18:16 GMT
Author: bodewig
Date: Thu Jan 17 14:18:16 2013
New Revision: 1434680

URL: http://svn.apache.org/viewvc?rev=1434680&view=rev
Log:
port Tomcat's logic for setting JAVA_HOME to an script - PR 52632

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/script/ant

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1434680&r1=1434679&r2=1434680&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jan 17 14:18:16 2013
@@ -65,6 +65,9 @@ Fixed bugs:
  * Zip task on <mappedresources> that excludes certain files by way of the mapper resulted
in a NullPointerException
    Bugzilla Report 54026
 
+ * The ant launcher script should properly detect JAVA_HOME on
+   MacOS X 10.7
+   Bugzilla Report 52632
 
 Other changes:
 --------------

Modified: ant/core/trunk/src/script/ant
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/script/ant?rev=1434680&r1=1434679&r2=1434680&view=diff
==============================================================================
--- ant/core/trunk/src/script/ant (original)
+++ ant/core/trunk/src/script/ant Thu Jan 17 14:18:16 2013
@@ -85,7 +85,11 @@ case "`uname`" in
   CYGWIN*) cygwin=true ;;
   Darwin*) darwin=true
            if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+               if [ -x '/usr/libexec/java_home' ] ; then
+                   JAVA_HOME=`/usr/libexec/java_home`
+               elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
]; then
+                   JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
+               fi
            fi
            ;;
   MINGW*) mingw=true ;;



Mime
View raw message