Index: lucene/common-build.xml
===================================================================
--- lucene/common-build.xml	(revision 1071818)
+++ lucene/common-build.xml	(working copy)
@@ -664,6 +664,13 @@
     </typedef>
   </target>
 
+  <target name="lucene-uptodate" unless="lucene.uptodate">
+    <uptodate property="lucene.uptodate" 
+              targetfile="${common.dir}/build/lucene-core-${version}.jar">
+     	<srcfiles dir="${common.dir}/src/java" includes="**/*.java"/>
+    </uptodate>
+  </target>
+  
   <target name="rat-sources" depends="rat-sources-typedef"
 	  description="runs the tasks over source and test files">
     <rat:report xmlns:rat="antlib:org.apache.rat.anttasks">
Index: lucene/contrib/contrib-build.xml
===================================================================
--- lucene/contrib/contrib-build.xml	(revision 1071818)
+++ lucene/contrib/contrib-build.xml	(working copy)
@@ -60,7 +60,11 @@
     <property name="core.compiled" value="true"/>
   </target>
   
-  <target name="init" depends="common.init,build-lucene"/>
+  <target name="jar-lucene" depends="build-lucene" unless="lucene.uptodate">
+    <ant dir="${common.dir}" target="jar-core" inheritAll="false"/>
+  </target>
+  
+  <target name="init" depends="common.init,lucene-uptodate,jar-lucene"/>
   <target name="compile-test" depends="init" if="contrib.has.tests">
     <antcall target="common.compile-test" inheritRefs="true" />
   </target>
