Apache Lucene open-source search software
LUCENE-2398: allow this test to work from eclipse too, simplify build some more
Robert Muir90a0edacca97
diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 3f0f6975574..f89e8f78246 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -441,10 +441,6 @@<sysproperty key="lucene.version" value="${dev.version}"/>- <!-- contrib/ant IndexTaskTest needs these two system properties -->- <sysproperty key="docs.dir" file="src/test"/>- <sysproperty key="index.dir" file="${build.dir}/test/index"/>-<!-- contrib/benchmark uses this system property to locate docs data and defined tasks --><sysproperty key="tasks.dir" file="${build.dir}/classes/java/org/apache/lucene/benchmark/byTask/tasks"/><sysproperty key="benchmark.work.dir" file="@{tempDir}/@{pattern}"/>diff --git a/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java b/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.javaindex 8efba8a5958..b58ed309bbb 100644--- a/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java+++ b/lucene/contrib/ant/src/test/org/apache/lucene/ant/IndexTaskTest.java@@ -39,9 +39,6 @@ public class IndexTaskTest extends LuceneTestCase {private final static String docHandler ="org.apache.lucene.ant.FileExtensionDocumentHandler";- private String docsDir = System.getProperty("docs.dir");- private File indexDir = new File(System.getProperty("index.dir"));-private Searcher searcher;private Analyzer analyzer;private FSDirectory dir;@@ -55,6 +52,9 @@ public class IndexTaskTest extends LuceneTestCase {@Overrideprotected void setUp() throws Exception {super.setUp();+ // slightly hackish way to get the src/test dir+ String docsDir = getDataFile("test.txt").getParent();+ File indexDir = TEMP_DIR;Project project = new Project();IndexTask task = new IndexTask();