Author: eli Date: Thu Jul 14 22:27:15 2011 New Revision: 1146912 URL: http://svn.apache.org/viewvc?rev=1146912&view=rev Log: HADOOP-7305. Eclipse project files are incomplete. Contributed by Niels Basjes
Modified: hadoop/common/trunk/common/CHANGES.txt hadoop/common/trunk/common/build.xml Modified: hadoop/common/trunk/common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/common/CHANGES.txt?rev=1146912&r1=1146911&r2=1146912&view=diff ============================================================================== --- hadoop/common/trunk/common/CHANGES.txt (original) +++ hadoop/common/trunk/common/CHANGES.txt Thu Jul 14 22:27:15 2011 @@ -264,6 +264,8 @@ Trunk (unreleased changes) HADOOP-7443. Add CRC32C as another DataChecksum implementation (todd) + HADOOP-7305. Eclipse project files are incomplete. (Niels Basjes via eli) + OPTIMIZATIONS HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole Modified: hadoop/common/trunk/common/build.xml URL: http://svn.apache.org/viewvc/hadoop/common/trunk/common/build.xml?rev=1146912&r1=1146911&r2=1146912&view=diff ============================================================================== --- hadoop/common/trunk/common/build.xml (original) +++ hadoop/common/trunk/common/build.xml Thu Jul 14 22:27:15 2011 @@ -1714,10 +1714,29 @@ <target name="eclipse" depends="init,ant-eclipse-download,ivy-retrieve-common,ivy-retrieve-test,compile-core-test" description="Create eclipse project files"> - <pathconvert property="eclipse.project"> - <path path="${basedir}"/> - <regexpmapper from="^.*/([^/]+)$$" to="\1" handledirsep="yes"/> - </pathconvert> + + <property environment="env"/> + + <!-- Locate the tools.jar which is part of the JDK --> + <condition property="jdk.tools.jar" value="${env.JDK_HOME}/lib/tools.jar"> + <available file="${env.JDK_HOME}/lib/tools.jar"/> + </condition> + <condition property="jdk.tools.jar" value="${env.JAVA_HOME}/lib/tools.jar"> + <available file="${env.JAVA_HOME}/lib/tools.jar"/> + </condition> + <condition property="jdk.tools.jar" value="${java.home}/../lib/tools.jar"> + <available file="${java.home}/../lib/tools.jar"/> + </condition> + + <!-- The tools.jar from the JDK is called classes.jar on OS X. --> + <condition property="jdk.tools.jar" value="${java.home}/bundle/Classes/classes.jar"> + <available file="${java.home}/bundle/Classes/classes.jar"/> + </condition> + + <pathconvert property="eclipse.project"> + <path path="${basedir}"/> + <regexpmapper from="^.*/([^/]+)$$" to="\1" handledirsep="yes"/> + </pathconvert> <taskdef name="eclipse" classname="prantl.ant.eclipse.EclipseTask" classpath="${build.dir}/lib/ant-eclipse-1.0-jvm1.2.jar" /> @@ -1737,7 +1756,7 @@ <library pathref="ivy-test.classpath" exported="false" /> <variable path="ANT_HOME/lib/ant.jar" exported="false" /> <library path="${conf.dir}" exported="false" /> - <library path="${java.home}/../lib/tools.jar" exported="false" /> + <library path="${jdk.tools.jar}" exported="false" /> </classpath> </eclipse> </target>