Index: src/test/org/apache/lucene/index/TestDoc.java
===================================================================
--- src/test/org/apache/lucene/index/TestDoc.java	(revision 822003)
+++ src/test/org/apache/lucene/index/TestDoc.java	(working copy)
@@ -16,21 +16,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import org.apache.lucene.util.LuceneTestCase;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
-
 import org.apache.lucene.analysis.SimpleAnalyzer;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
+import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.demo.FileDocument;
+import org.apache.lucene.util.LuceneTestCase;
 
-import java.io.*;
-import java.util.*;
 
-
 /** JUnit adaptation of an older test case DocTest.
  *
  * @version $Id$
@@ -163,7 +169,8 @@
    throws Exception
    {
       File file = new File(workDir, fileName);
-      Document doc = FileDocument.Document(file);
+      Document doc = new Document();
+      doc.add(new Field("contents", new FileReader(file)));
       writer.addDocument(doc);
       writer.flush();
       return writer.newestSegment();
Index: build.xml
===================================================================
--- build.xml	(revision 822003)
+++ build.xml	(working copy)
@@ -46,7 +46,7 @@
   </path>
   
   <path id="test.classpath">
-    <path refid="demo.classpath"/>
+  	<path refid="classpath"/>
     <path refid="junit-path"/>
     <pathelement location="${build.dir}/classes/test"/>
   </path>
@@ -56,7 +56,6 @@
     <path refid="junit-path"/>
     <pathelement location="${build.dir}/classes/test"/>
     <pathelement location="${build.dir}/classes/java"/>
-    <pathelement location="${build.dir}/classes/demo"/>
     <pathelement path="${java.class.path}"/>
   </path>
 
@@ -88,7 +87,6 @@
 	
   <path id="tag.test.classpath">
     <path refid="junit-path"/>
-    <pathelement location="${build.dir}/classes/demo"/>
     <pathelement location="${build.dir}/${tag}/${tag}.jar"/>
   </path>
 	
@@ -96,7 +94,6 @@
     <path refid="junit-path"/>
     <pathelement location="${build.dir}/${tag}/classes/test"/>
     <pathelement location="${build.dir}/${final.name}.jar"/>
-    <pathelement location="${build.dir}/classes/demo"/>
     <pathelement path="${java.class.path}"/>
   </path>
 
@@ -111,7 +108,7 @@
 	</sequential>
   </target>
 	
-  <target name="test-tag" depends="download-tag, compile-core, compile-demo, jar-core"
+  <target name="test-tag" depends="download-tag, compile-core, jar-core"
   	description="Runs tests of a previous Lucene version. Specify tag version like this: -Dtag=branches/lucene_2_9_back_compat_tests">
 	<sequential>
       <available property="tag.available" file="${tags.dir}/${tag}/src/test" />
@@ -220,11 +217,6 @@
     </compile>
   </target>
 
-  <!-- TODO: Remove dependency on demo from test -->
-  <target name="compile-test" depends="compile-demo,common.compile-test"/>
-
-
-
   <!-- ================================================================== -->
   <!-- D O C U M E N T A T I O N                                          -->
   <!-- ================================================================== -->
