mirror of https://github.com/apache/lucene.git
keep lucene from compiling 5 times when running test and reorganize all the lucene refs in one spot
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/newtrunk@925382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d56233ab6b
commit
7ff48d1133
|
@ -639,53 +639,6 @@
|
|||
|
||||
</target>
|
||||
|
||||
<target name="prep-lucene-jars">
|
||||
<sequential>
|
||||
<subant target="jar-core" inheritall="false" failonerror="true">
|
||||
<fileset dir="../lucene/" includes="build.xml" />
|
||||
</subant>
|
||||
<subant target="jar" inheritall="false" failonerror="true">
|
||||
<fileset dir="../lucene/contrib/analyzers/common" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/fast-vector-highlighter" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/highlighter" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/memory" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/misc" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/queries" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/spatial" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/spellchecker" includes="build.xml" />
|
||||
</subant>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="lucene-jars-to-solr" depends="prep-lucene-jars">
|
||||
<mkdir dir="lucene-libs"/>
|
||||
<copy todir="lucene-libs" preservelastmodified="true" flatten="true" failonerror="true">
|
||||
<resources>
|
||||
<file file="../lucene/build/lucene-core-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/analyzers/common/lucene-analyzers-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/fast-vector-highlighter/lucene-fast-vector-highlighter-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/highlighter/lucene-highlighter-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/memory/lucene-memory-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/misc/lucene-misc-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/queries/lucene-queries-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/spatial/lucene-spatial-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/spellchecker/lucene-spellchecker-${lucene_version}.jar" />
|
||||
</resources>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="compile-lucene">
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/analyzers/common"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/fast-vector-highlighter"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/highlighter"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/memory"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/misc"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/queries"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/spatial"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/spellchecker"/>
|
||||
</target>
|
||||
|
||||
<!-- make a distribution -->
|
||||
<target name="package" depends="generate-maven-artifacts"/>
|
||||
|
||||
|
|
|
@ -142,6 +142,8 @@
|
|||
</and>
|
||||
</condition>
|
||||
|
||||
<!-- Lucene -->
|
||||
|
||||
<path id="lucene.classpath">
|
||||
<pathelement location="${common-solr.dir}/../lucene/build/classes/java" />
|
||||
<pathelement location="${common-solr.dir}/../lucene/build/contrib/analyzers/common/classes/java" />
|
||||
|
@ -154,6 +156,54 @@
|
|||
<pathelement location="${common-solr.dir}/../lucene/build/contrib/spellchecker/classes/java" />
|
||||
</path>
|
||||
|
||||
<target name="prep-lucene-jars">
|
||||
<sequential>
|
||||
<subant target="jar-core" inheritall="false" failonerror="true">
|
||||
<fileset dir="../lucene/" includes="build.xml" />
|
||||
</subant>
|
||||
<subant target="jar" inheritall="false" failonerror="true">
|
||||
<fileset dir="../lucene/contrib/analyzers/common" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/fast-vector-highlighter" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/highlighter" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/memory" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/misc" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/queries" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/spatial" includes="build.xml" />
|
||||
<fileset dir="../lucene/contrib/spellchecker" includes="build.xml" />
|
||||
</subant>
|
||||
</sequential>
|
||||
</target>
|
||||
|
||||
<target name="lucene-jars-to-solr" depends="prep-lucene-jars">
|
||||
<mkdir dir="lucene-libs"/>
|
||||
<copy todir="lucene-libs" preservelastmodified="true" flatten="true" failonerror="true">
|
||||
<resources>
|
||||
<file file="../lucene/build/lucene-core-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/analyzers/common/lucene-analyzers-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/fast-vector-highlighter/lucene-fast-vector-highlighter-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/highlighter/lucene-highlighter-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/memory/lucene-memory-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/misc/lucene-misc-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/queries/lucene-queries-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/spatial/lucene-spatial-${lucene_version}.jar" />
|
||||
<file file="../lucene/build/contrib/spellchecker/lucene-spellchecker-${lucene_version}.jar" />
|
||||
</resources>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="compile-lucene" unless="lucene-compiled">
|
||||
<property name="lucene-compiled" value="true"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/analyzers/common"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/fast-vector-highlighter"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/highlighter"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/memory"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/misc"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/queries"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/spatial"/>
|
||||
<ant antfile="build.xml" target="compile" dir="../lucene/contrib/spellchecker"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Macro for compilation -->
|
||||
<macrodef name="solr-javac">
|
||||
|
@ -229,6 +279,7 @@
|
|||
<attribute name="failonerror" default="true"/>
|
||||
<sequential>
|
||||
<subant target="@{target}" failonerror="@{failonerror}">
|
||||
<property name="lucene-compiled" value="${lucene.compiled}"/>
|
||||
<fileset dir="."
|
||||
includes="contrib/*/build.xml"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue