浏览代码

HADOOP-9350. Hadoop not building against Java7 on OSX

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1522866 13f79535-47bb-0310-9956-ffa450edef68
Steve Loughran 11 年之前
父节点
当前提交
721326be6a
共有 3 个文件被更改,包括 31 次插入0 次删除
  1. 13 0
      BUILDING.txt
  2. 15 0
      hadoop-common-project/hadoop-annotations/pom.xml
  3. 3 0
      hadoop-common-project/hadoop-common/CHANGES.txt

+ 13 - 0
BUILDING.txt

@@ -149,6 +149,19 @@ Create a local staging version of the website (in /tmp/hadoop-site)
 
 
 ----------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------
 
 
+Building on OS/X
+
+----------------------------------------------------------------------------------
+
+A one-time manual step is required to enable building Hadoop OS X with Java 7
+every time the JDK is updated.
+see: https://issues.apache.org/jira/browse/HADOOP-9350
+
+$ sudo mkdir `/usr/libexec/java_home`/Classes
+$ sudo ln -s `/usr/libexec/java_home`/lib/tools.jar `/usr/libexec/java_home`/Classes/classes.jar
+
+----------------------------------------------------------------------------------
+
 Building on Windows
 Building on Windows
 
 
 ----------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------

+ 15 - 0
hadoop-common-project/hadoop-annotations/pom.xml

@@ -56,6 +56,21 @@
         </dependency>
         </dependency>
       </dependencies>
       </dependencies>
     </profile>
     </profile>
+    <profile>
+      <id>jdk1.7</id>
+      <activation>
+        <jdk>1.7</jdk>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>jdk.tools</groupId>
+          <artifactId>jdk.tools</artifactId>
+          <version>1.7</version>
+          <scope>system</scope>
+          <systemPath>${java.home}/../lib/tools.jar</systemPath>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
   </profiles>
 
 
 </project>
 </project>

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -79,6 +79,9 @@ Release 2.3.0 - UNRELEASED
 
 
     HADOOP-9908. Fix NPE when versioninfo properties file is missing (todd)
     HADOOP-9908. Fix NPE when versioninfo properties file is missing (todd)
 
 
+    HADOOP-9350. Hadoop not building against Java7 on OSX
+    (Robert Kanter via stevel)
+
 Release 2.1.1-beta - UNRELEASED
 Release 2.1.1-beta - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES