when compiling, don't include whatever happens to be in ant's runtime in the classpath

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1052991 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-12-27 03:13:14 +00:00
parent 25b3f63fbd
commit 79133e4f04
4 changed files with 35 additions and 1 deletions

View File

@ -31,6 +31,7 @@
<path id="test.classpath"> <path id="test.classpath">
<path refid="classpath"/> <path refid="classpath"/>
<path refid="junit-path"/> <path refid="junit-path"/>
<path refid="ant-path"/>
<pathelement location="${build.dir}/classes/test"/> <pathelement location="${build.dir}/classes/test"/>
</path> </path>
@ -67,6 +68,7 @@
<path id="backwards.test.compile.classpath"> <path id="backwards.test.compile.classpath">
<path refid="junit-path"/> <path refid="junit-path"/>
<path refid="ant-path"/>
<fileset dir="${backwards.dir}/lib"> <fileset dir="${backwards.dir}/lib">
<include name="lucene-core*.jar"/> <include name="lucene-core*.jar"/>
</fileset> </fileset>

View File

@ -53,6 +53,10 @@
<pathelement location="${junit-location.jar}"/> <pathelement location="${junit-location.jar}"/>
</path> </path>
<path id="ant-path">
<fileset dir="${common.dir}/lib" includes="ant-*.jar"/>
</path>
<!-- default arguments to pass to JVM executing tests --> <!-- default arguments to pass to JVM executing tests -->
<property name="testmethod" value=""/> <property name="testmethod" value=""/>
<property name="args" value=""/> <property name="args" value=""/>
@ -81,6 +85,9 @@
<property name="javac.target" value="1.5"/> <property name="javac.target" value="1.5"/>
<property name="javac.source.backwards" value="1.5"/> <property name="javac.source.backwards" value="1.5"/>
<property name="javac.target.backwards" value="1.5"/> <property name="javac.target.backwards" value="1.5"/>
<!-- clover wants to run with -lib, otherwise we prefer a repeatable
classpath -->
<property name="javac.includeAntRuntime" value="${run.clover}"/>
<property name="javadoc.link" value="http://java.sun.com/j2se/1.5/docs/api/"/> <property name="javadoc.link" value="http://java.sun.com/j2se/1.5/docs/api/"/>
<property name="javadoc.access" value="protected"/> <property name="javadoc.access" value="protected"/>
@ -655,6 +662,7 @@
<sequential> <sequential>
<mkdir dir="@{destdir}"/> <mkdir dir="@{destdir}"/>
<javac <javac
includeAntRuntime="${javac.includeAntRuntime}"
encoding="${build.encoding}" encoding="${build.encoding}"
srcdir="@{srcdir}" srcdir="@{srcdir}"
destdir="@{destdir}" destdir="@{destdir}"

View File

@ -38,11 +38,30 @@
<module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar" <module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"
property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/> property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/>
<path id="classpath"> <path id="common.classpath">
<pathelement path="${analyzers-common.jar}"/> <pathelement path="${analyzers-common.jar}"/>
<path refid="base.classpath"/> <path refid="base.classpath"/>
</path> </path>
<!-- tricky: we compile against our supported version of ant (ant-path),
but because ant's junit task's includeantruntime *does not work at all*,
we hack up a custom test classpath that runs against the runtime ant.
this is the only way to avoid having two different versions of ant
in the classpath -->
<path id="classpath">
<path refid="common.classpath"/>
<path refid="ant-path"/>
</path>
<path id="junit.classpath">
<path refid="common.classpath"/>
<pathelement location="${common.dir}/build/classes/test"/>
<path refid="junit-path"/>
<pathelement location="${build.dir}/classes/java"/>
<pathelement location="${build.dir}/classes/test"/>
</path>
<target name="compile-core" depends="compile-analyzers-common, common.compile-core" /> <target name="compile-core" depends="compile-analyzers-common, common.compile-core" />
<target name="compile-analyzers-common" unless="analyzers-common.uptodate"> <target name="compile-analyzers-common" unless="analyzers-common.uptodate">

View File

@ -81,6 +81,10 @@
<!-- Java Version we are compatible with --> <!-- Java Version we are compatible with -->
<property name="java.compat.version" value="1.6" /> <property name="java.compat.version" value="1.6" />
<!-- clover wants to run with -lib, otherwise we prefer a repeatable
classpath -->
<property name="javac.includeAntRuntime" value="${run.clover}"/>
<!-- Solr Implementation Version --> <!-- Solr Implementation Version -->
<!-- <!--
This can be any string value that does not include spaces This can be any string value that does not include spaces
@ -263,6 +267,7 @@
source="${java.compat.version}" source="${java.compat.version}"
debug="on" debug="on"
encoding="utf8" encoding="utf8"
includeAntRuntime="${javac.includeAntRuntime}"
sourcepath="" sourcepath=""
classpathref="@{classpathref}"> classpathref="@{classpathref}">
<nested /> <nested />