Index: build.xml
===================================================================
--- build.xml	(revision 925107)
+++ build.xml	(working copy)
@@ -674,6 +674,7 @@
     <attribute name="failonerror" default="true"/>
     <sequential>
       <subant target="@{target}" failonerror="@{failonerror}">
+        <property name="core.compiled" value="1"/>
         <fileset dir="."
                  includes="contrib/*/build.xml"
         />
@@ -681,7 +682,7 @@
     </sequential>
   </macrodef>
 
-  <target name="build-contrib"
+  <target name="build-contrib" depends="jar-core,compile-test"
           description="Builds all contrib modules and their tests">
     <contrib-crawl target="build-artifacts-and-tests"/>
   </target>
Index: contrib/contrib-build.xml
===================================================================
--- contrib/contrib-build.xml	(revision 925107)
+++ contrib/contrib-build.xml	(working copy)
@@ -28,9 +28,6 @@
   <import file="../common-build.xml"/>
 
   <property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/>
-  <available property="lucene.jar.present" type="file" file="${lucene.jar}"/>
-  <available property="lucene.tests.present" type="dir"
-             file="${common.dir}/build/classes/test" />
   <available property="contrib.has.tests" type="dir" file="src/test" />
   
   <path id="classpath">
@@ -52,16 +49,14 @@
     <pathelement path="${java.class.path}"/>
   </path>
 
-  <target name="build-lucene" unless="lucene.jar.present">
+  <target name="build-lucene" unless="core.compiled">
     <ant dir="${common.dir}" target="jar-core" inheritAll="false"/>
-  </target>
-
-  <target name="build-lucene-tests" unless="lucene.tests.present">
     <ant dir="${common.dir}" target="compile-test" inheritAll="false"/>
+    <!-- set the property for this ant execution to speed up later tasks depending on this -->
+    <property name="core.compiled" value="1"/>
   </target>
-
   
-  <target name="init" depends="common.init,build-lucene,build-lucene-tests"/>
+  <target name="init" depends="common.init,build-lucene"/>
   <target name="compile-test" depends="init" if="contrib.has.tests">
     <antcall target="common.compile-test" inheritRefs="true" />
   </target>
Index: contrib/spellchecker/build.xml
===================================================================
--- contrib/spellchecker/build.xml	(revision 925107)
+++ contrib/spellchecker/build.xml	(working copy)
@@ -24,6 +24,4 @@
   </description>
 
   <import file="../contrib-build.xml"/>
-  <target name="compile-test"
-          depends="build-lucene-tests,contrib-build.compile-test" />
 </project>

