LUCENE-3160: lucene source build doesn't work correctly by itself

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1129445 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-05-31 00:08:14 +00:00
parent 42a2a5df7e
commit c8101d708c
8 changed files with 36 additions and 57 deletions

View File

@ -18,7 +18,6 @@
--> -->
<project name="lucene-solr" default="test" basedir="."> <project name="lucene-solr" default="test" basedir=".">
<import file="common-build.xml"/>
<target name="test" description="Test both Lucene and Solr" depends="validate"> <target name="test" description="Test both Lucene and Solr" depends="validate">
<sequential> <sequential>
<subant target="test" inheritall="false" failonerror="true"> <subant target="test" inheritall="false" failonerror="true">

View File

@ -1,32 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="all-common" basedir="."
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<dirname file="${ant.file.all-common}" property="all.common.dir"/>
<path id="tools.runtime.classpath">
<pathelement location="${all.common.dir}/lucene/build/classes/tools"/>
</path>
<target name="compile-tools" description="Compile the Test Framework and Validation tools">
<sequential>
<subant target="compile-tools" inheritall="false" failonerror="true">
<fileset dir="${all.common.dir}/lucene" includes="build.xml" />
</subant>
</sequential>
</target>
</project>

View File

@ -24,7 +24,6 @@
</description> </description>
<dirname file="${ant.file.common}" property="common.dir"/> <dirname file="${ant.file.common}" property="common.dir"/>
<import file="${common.dir}/../common-build.xml"/>
<property name="dev-tools.dir" value="${common.dir}/../dev-tools"/> <property name="dev-tools.dir" value="${common.dir}/../dev-tools"/>
<property name="prettify.dir" value="${common.dir}/src/tools/prettify"/> <property name="prettify.dir" value="${common.dir}/src/tools/prettify"/>
<property name="maven.build.dir" value="${common.dir}/build/maven"/> <property name="maven.build.dir" value="${common.dir}/build/maven"/>
@ -61,6 +60,11 @@
<fileset dir="${common.dir}/lib" includes="ant-*.jar"/> <fileset dir="${common.dir}/lib" includes="ant-*.jar"/>
</path> </path>
<path id="tools.runtime.classpath">
<pathelement location="${common.dir}/build/classes/tools"/>
</path>
<!-- default arguments to pass to JVM executing tests --> <!-- default arguments to pass to JVM executing tests -->
<property name="testmethod" value=""/> <property name="testmethod" value=""/>
<property name="args" value=""/> <property name="args" value=""/>

View File

@ -57,6 +57,13 @@
<ant dir="smartcn" target="clean" /> <ant dir="smartcn" target="clean" />
<ant dir="stempel" target="clean" /> <ant dir="stempel" target="clean" />
</target> </target>
<target name="validate">
<ant dir="common" target="validate" />
<ant dir="icu" target="validate" />
<ant dir="phonetic" target="validate" />
<ant dir="smartcn" target="validate" />
<ant dir="stempel" target="validate" />
</target>
<target name="compile-core"> <target name="compile-core">
<ant dir="common" target="compile-core" /> <ant dir="common" target="compile-core" />
<ant dir="icu" target="compile-core" /> <ant dir="icu" target="compile-core" />

View File

@ -106,7 +106,7 @@
</java> </java>
</target> </target>
<target name="compile-tools"> <target name="compile-tools" depends="common.compile-tools">
<compile <compile
srcdir="src/tools/java" srcdir="src/tools/java"
destdir="${build.dir}/classes/tools"> destdir="${build.dir}/classes/tools">

View File

@ -125,7 +125,7 @@ are part of the ICU4C package. See http://site.icu-project.org/ </echo>
</java> </java>
</target> </target>
<target name="compile-tools"> <target name="compile-tools" depends="common.compile-tools">
<compile <compile
srcdir="src/tools/java" srcdir="src/tools/java"
destdir="${build.dir}/classes/tools"> destdir="${build.dir}/classes/tools">

View File

@ -18,7 +18,6 @@
--> -->
<project name="modules" default="test" basedir="."> <project name="modules" default="test" basedir=".">
<import file="../common-build.xml"/>
<target name="test" description="Test all modules"> <target name="test" description="Test all modules">
<sequential> <sequential>
<subant target="test" inheritall="false" failonerror="true"> <subant target="test" inheritall="false" failonerror="true">
@ -30,7 +29,7 @@
</sequential> </sequential>
</target> </target>
<target name="compile" description="Compile all modules" depends="validate-modules"> <target name="compile" description="Compile all modules" depends="validate">
<sequential> <sequential>
<subant target="compile" inheritall="false" failonerror="true"> <subant target="compile" inheritall="false" failonerror="true">
<fileset dir="analysis" includes="build.xml" /> <fileset dir="analysis" includes="build.xml" />
@ -74,24 +73,15 @@
</subant> </subant>
</sequential> </sequential>
</target> </target>
<target name="validate" depends="validate-modules"/> <target name="validate">
<target name="validate-modules" depends="check-legal-modules" unless="validated-modules"/> <sequential>
<target name="check-legal-modules" depends="compile-tools"> <subant target="validate" inheritall="false" failonerror="true">
<java classname="org.apache.lucene.validation.DependencyChecker" failonerror="true" fork="true"> <fileset dir="analysis" includes="build.xml" />
<classpath> <fileset dir="benchmark" includes="build.xml" />
<path refid="tools.runtime.classpath" /> <fileset dir="grouping" includes="build.xml" />
</classpath> <fileset dir="suggest" includes="build.xml" />
<!-- TODO: it might be better to just automatically find all directories that contain jar files, but that could take a </subant>
long time. This should be faster, but we could miss a directory </sequential>
-->
<!-- Modules -->
<arg value="-c" />
<arg value="${basedir}/analysis/icu/lib" />
<arg value="-c" />
<arg value="${basedir}/analysis/phonetic/lib" />
<arg value="-c" />
<arg value="${basedir}/benchmark/lib" />
</java>
</target> </target>
<target name="clean" description="Clean all modules"> <target name="clean" description="Clean all modules">

View File

@ -22,7 +22,6 @@
</description> </description>
<dirname file="${ant.file.common-solr}" property="common-solr.dir"/> <dirname file="${ant.file.common-solr}" property="common-solr.dir"/>
<import file="${common-solr.dir}/../common-build.xml"/>
<!-- change this together with the default and test's solrconfig.xml after starting a new development branch: --> <!-- change this together with the default and test's solrconfig.xml after starting a new development branch: -->
<property name="tests.luceneMatchVersion" value="4.0"/> <property name="tests.luceneMatchVersion" value="4.0"/>
@ -636,4 +635,16 @@
</java> </java>
</target> </target>
<path id="tools.runtime.classpath">
<pathelement location="${common-solr.dir}/../lucene/build/classes/tools"/>
</path>
<target name="compile-tools" description="Compile the Test Framework and Validation tools">
<sequential>
<subant target="compile-tools" inheritall="false" failonerror="true">
<fileset dir="${common-solr.dir}/../lucene" includes="build.xml" />
</subant>
</sequential>
</target>
</project> </project>