Skip to content

Apache Lucene open-source search software

LUCENE-2952: restore src/tools and move validation there

Grant Ingersolled20a24d2244
diff --git a/common-build.xml b/common-build.xml
index a622cf37712..c96737d7bdb 100644
--- a/common-build.xml
+++ b/common-build.xml
@@ -19,12 +19,12 @@
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<dirname file="${ant.file.all-common}" property="all.common.dir"/>
- <path id="validation.runtime.classpath">
- <pathelement location="${all.common.dir}/lucene/build/classes/test-framework"/>
+ <path id="tools.runtime.classpath">
+ <pathelement location="${all.common.dir}/lucene/build/classes/tools"/>
</path>
- <target name="compile-test-framework" description="Compile the Test Framework and Validation tools">
+ <target name="compile-tools" description="Compile the Test Framework and Validation tools">
<sequential>
- <subant target="compile-test-framework" inheritall="false" failonerror="true">
+ <subant target="compile-tools" inheritall="false" failonerror="true">
<fileset dir="${all.common.dir}/lucene" includes="build.xml" />
</subant>
</sequential>
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 5d8daa97aba..77b0647aad1 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -424,6 +424,14 @@
test.classpath="test.classpath"/>
</target>
+ <target name="compile-tools">
+ <compile
+ srcdir="${common.dir}/src/tools/java"
+ destdir="${build.dir}/classes/tools">
+ <classpath refid="classpath"/>
+ </compile>
+ </target>
+
<target name="compile-test" depends="compile-test-framework">
<compile-test-macro srcdir="${tests.src.dir}" destdir="${build.dir}/classes/test"
test.classpath="test.classpath"/>
@@ -794,10 +802,10 @@
<!-- VALIDATION work -->
- <target name="check-legal-lucene" depends="compile-test-framework">
+ <target name="check-legal-lucene" depends="compile-tools">
<java classname="org.apache.lucene.validation.DependencyChecker" failonerror="true" fork="true">
<classpath>
- <path refid="validation.runtime.classpath" />
+ <path refid="tools.runtime.classpath" />
</classpath>
<!-- TODO: it might be better to just automatically find all directories that contain jar files, but that could take a
long time. This should be faster, but we could miss a directory
diff --git a/lucene/src/test-framework/org/apache/lucene/validation/DependencyChecker.java b/lucene/src/tools/java/org/apache/lucene/validation/DependencyChecker.java
similarity index 100%
rename from lucene/src/test-framework/org/apache/lucene/validation/DependencyChecker.java
rename to lucene/src/tools/java/org/apache/lucene/validation/DependencyChecker.java
diff --git a/lucene/src/test-framework/org/apache/lucene/validation/LicenseType.java b/lucene/src/tools/java/org/apache/lucene/validation/LicenseType.java
similarity index 100%
rename from lucene/src/test-framework/org/apache/lucene/validation/LicenseType.java
rename to lucene/src/tools/java/org/apache/lucene/validation/LicenseType.java
diff --git a/modules/build.xml b/modules/build.xml
index fe9a1931715..2608e3941e0 100644
--- a/modules/build.xml
+++ b/modules/build.xml
@@ -66,10 +66,10 @@
</target>
<target name="validate" depends="validate-modules"/>
<target name="validate-modules" depends="check-legal-modules" unless="validated-modules"/>
- <target name="check-legal-modules" depends="compile-test-framework">
+ <target name="check-legal-modules" depends="compile-tools">
<java classname="org.apache.lucene.validation.DependencyChecker" failonerror="true" fork="true">
<classpath>
- <path refid="validation.runtime.classpath" />
+ <path refid="tools.runtime.classpath" />
</classpath>
<!-- TODO: it might be better to just automatically find all directories that contain jar files, but that could take a
long time. This should be faster, but we could miss a directory
diff --git a/solr/common-build.xml b/solr/common-build.xml
index f4e28dcb1ec..e9fb56f973d 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -577,10 +577,10 @@
<target name="validate" depends="validate-solr"/>
<target name="validate-solr" depends="check-legal-solr" unless="validated-solr"/>
- <target name="check-legal-solr" depends="compile-test-framework">
+ <target name="check-legal-solr" depends="compile-tools">
<java classname="org.apache.lucene.validation.DependencyChecker" failonerror="true" fork="true">
<classpath>
- <path refid="validation.runtime.classpath" />
+ <path refid="tools.runtime.classpath" />
</classpath>
<!-- TODO: it might be better to just automatically find all directories that contain jar files, but that could take a
long time. This should be faster, but we could miss a directory