You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2010/12/27 04:13:14 UTC
svn commit: r1052991 - in /lucene/dev/trunk: lucene/build.xml
lucene/common-build.xml lucene/contrib/ant/build.xml solr/common-build.xml
Author: rmuir
Date: Mon Dec 27 03:13:14 2010
New Revision: 1052991
URL: http://svn.apache.org/viewvc?rev=1052991&view=rev
Log:
when compiling, don't include whatever happens to be in ant's runtime in the classpath
Modified:
lucene/dev/trunk/lucene/build.xml
lucene/dev/trunk/lucene/common-build.xml
lucene/dev/trunk/lucene/contrib/ant/build.xml
lucene/dev/trunk/solr/common-build.xml
Modified: lucene/dev/trunk/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/build.xml?rev=1052991&r1=1052990&r2=1052991&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/build.xml (original)
+++ lucene/dev/trunk/lucene/build.xml Mon Dec 27 03:13:14 2010
@@ -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>
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1052991&r1=1052990&r2=1052991&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Mon Dec 27 03:13:14 2010
@@ -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}"
Modified: lucene/dev/trunk/lucene/contrib/ant/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/ant/build.xml?rev=1052991&r1=1052990&r2=1052991&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/ant/build.xml (original)
+++ lucene/dev/trunk/lucene/contrib/ant/build.xml Mon Dec 27 03:13:14 2010
@@ -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">
Modified: lucene/dev/trunk/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/common-build.xml?rev=1052991&r1=1052990&r2=1052991&view=diff
==============================================================================
--- lucene/dev/trunk/solr/common-build.xml (original)
+++ lucene/dev/trunk/solr/common-build.xml Mon Dec 27 03:13:14 2010
@@ -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 />