|
@@ -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>
|