Apache Lucene open-source search software
when compiling, don't include whatever happens to be in ant's runtime in the classpath
Robert Muir79133e4f0452
diff --git a/lucene/build.xml b/lucene/build.xmlindex d9fc7c490bf..c87d8480d41 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -31,6 +31,7 @@<path id="test.classpath"><path refid="classpath"/><path refid="junit-path"/>+ <path refid="ant-path"/><pathelement location="${build.dir}/classes/test"/></path>@@ -67,6 +68,7 @@<path id="backwards.test.compile.classpath"><path refid="junit-path"/>+ <path refid="ant-path"/><fileset dir="${backwards.dir}/lib"><include name="lucene-core*.jar"/></fileset>diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 34dd3fed1d2..abae480a8fd 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -53,6 +53,10 @@<pathelement location="${junit-location.jar}"/></path>+ <path id="ant-path">+ <fileset dir="${common.dir}/lib" includes="ant-*.jar"/>+ </path>+<!-- default arguments to pass to JVM executing tests --><property name="testmethod" value=""/><property name="args" value=""/>@@ -81,6 +85,9 @@<property name="javac.target" value="1.5"/><property name="javac.source.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.access" value="protected"/>@@ -655,6 +662,7 @@<sequential><mkdir dir="@{destdir}"/><javac+ includeAntRuntime="${javac.includeAntRuntime}"encoding="${build.encoding}"srcdir="@{srcdir}"destdir="@{destdir}"diff --git a/lucene/contrib/ant/build.xml b/lucene/contrib/ant/build.xmlindex 6fb63aac7e0..f68e4a19daf 100644--- a/lucene/contrib/ant/build.xml+++ b/lucene/contrib/ant/build.xml@@ -38,11 +38,30 @@<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"/>- <path id="classpath">+ <path id="common.classpath"><pathelement path="${analyzers-common.jar}"/><path refid="base.classpath"/></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-analyzers-common" unless="analyzers-common.uptodate">diff --git a/solr/common-build.xml b/solr/common-build.xmlindex 1495a065650..b63ba6e1a54 100644--- a/solr/common-build.xml+++ b/solr/common-build.xml@@ -81,6 +81,10 @@<!-- Java Version we are compatible with --><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 --><!--This can be any string value that does not include spaces@@ -263,6 +267,7 @@source="${java.compat.version}"debug="on"encoding="utf8"+ includeAntRuntime="${javac.includeAntRuntime}"sourcepath=""classpathref="@{classpathref}"><nested />