switch Solr to really run off lucene trunk rather than just copy jars - still needs some love (too many duplicate lucene refs for one) but its a start

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/newtrunk@924634 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2010-03-18 04:39:17 +00:00
parent 2a282e21a1
commit cd490f915a
16 changed files with 136 additions and 61 deletions

View File

@ -33,24 +33,6 @@
</sequential> </sequential>
</target> </target>
<target name="lucene-jars-to-solr">
<!-- temp hack - copy lucene jars to solr -->
<copy todir="solr/lib" preservelastmodified="true" flatten="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="clean"> <target name="clean">
<sequential> <sequential>
<subant target="clean" inheritall="false" failonerror="true"> <subant target="clean" inheritall="false" failonerror="true">

View File

@ -87,7 +87,7 @@
<target name="init-forrest-entities"> <target name="init-forrest-entities">
<!-- no description, don't advertise --> <!-- no description, don't advertise -->
<!-- Building off Lucene trunk, we don't need this
<available file="lib/lucene-core-${lucene_version}.jar" <available file="lib/lucene-core-${lucene_version}.jar"
property="lucene-version-ok-m2deploy-wont-fail" /> property="lucene-version-ok-m2deploy-wont-fail" />
<fail unless="lucene-version-ok-m2deploy-wont-fail"> <fail unless="lucene-version-ok-m2deploy-wont-fail">
@ -99,7 +99,7 @@
Probably cause: lucene jars were upgraded w/o modifying the Probably cause: lucene jars were upgraded w/o modifying the
'lucene_version' property in common-build.xml 'lucene_version' property in common-build.xml
</fail> </fail>
-->
<mkdir dir="${dest}" /> <mkdir dir="${dest}" />
@ -116,12 +116,24 @@
<!-- ===================== COMPILATION-RELATED TASKS ========================= --> <!-- ===================== COMPILATION-RELATED TASKS ========================= -->
<!-- ========================================================================= --> <!-- ========================================================================= -->
<path id="lucene.classpath">
<pathelement location="../lucene/build/classes/java" />
<pathelement location="../lucene/build/contrib/analyzers/common/classes/java" />
<pathelement location="../lucene/build/contrib/fast-vector-highlighter/classes/java" />
<pathelement location="../lucene/build/contrib/highlighter/classes/java" />
<pathelement location="../lucene/build/contrib/memory/classes/java" />
<pathelement location="../lucene/build/contrib/misc/classes/java" />
<pathelement location="../lucene/build/contrib/queries/classes/java" />
<pathelement location="../lucene/build/contrib/spatial/classes/java" />
<pathelement location="../lucene/build/contrib/spellchecker/classes/java" />
</path>
<!-- The compilation classpath --> <!-- The compilation classpath -->
<path id="compile.classpath"> <path id="compile.classpath">
<fileset dir="${lib}"> <fileset dir="${lib}">
<include name="*.jar" /> <include name="*.jar" />
</fileset> </fileset>
<pathelement location="${dest}/common"/> <path refid="lucene.classpath"/>
</path> </path>
<target name="compile-solrj" <target name="compile-solrj"
@ -149,7 +161,7 @@
<!-- Compile the project. --> <!-- Compile the project. -->
<target name="compile" <target name="compile"
description="Compile the source code." description="Compile the source code."
depends="compile-solrj,init-forrest-entities"> depends="compile-lucene, compile-solrj,init-forrest-entities">
<solr-javac destdir="${dest}/solr" <solr-javac destdir="${dest}/solr"
classpathref="compile.classpath.solrj"> classpathref="compile.classpath.solrj">
@ -339,18 +351,15 @@
<path id="test.compile.classpath"> <path id="test.compile.classpath">
<path refid="compile.classpath" /> <path refid="compile.classpath" />
<path refid="compile.classpath.solrj" /> <path refid="compile.classpath.solrj" />
<pathelement location="${dest}/solr"/> <pathelement location="${dest}/solr"/>
<pathelement location="${dest}/solrj"/> <!-- include solrj --> <pathelement location="${dest}/solrj"/> <!-- include solrj -->
</path> </path>
<path id="test.run.classpath"> <path id="test.run.classpath">
<path refid="test.compile.classpath" /> <path refid="test.compile.classpath" />
<pathelement location="${dest}/tests"/> <pathelement location="${dest}/tests"/>
<!-- include the solrj classpath and jetty files included in example -->
<!-- include the solrj classpath and jetty files included in example -->
<path refid="compile.classpath.solrj" /> <path refid="compile.classpath.solrj" />
<pathelement path="${java.class.path}"/> <pathelement path="${java.class.path}"/>
</path> </path>
@ -396,7 +405,7 @@
failureProperty="tests.failed" failureProperty="tests.failed"
dir="src/test/test-files/" dir="src/test/test-files/"
> >
<sysproperty key="java.util.logging.config.file" value="${common.dir}/testlogging.properties"/> <sysproperty key="java.util.logging.config.file" value="${common-solr.dir}/testlogging.properties"/>
<sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/> <sysproperty key="tests.luceneMatchVersion" value="${tests.luceneMatchVersion}"/>
<jvmarg line="${args}"/> <jvmarg line="${args}"/>
<formatter type="brief" usefile="false" if="junit.details"/> <formatter type="brief" usefile="false" if="junit.details"/>
@ -492,7 +501,7 @@
<!-- Creates the Solr WAR file. --> <!-- Creates the Solr WAR file. -->
<target name="dist-war" <target name="dist-war"
description="Creates the Solr WAR Distribution file." description="Creates the Solr WAR Distribution file."
depends="compile, make-manifest, dist-jar, dist-solrj"> depends="compile, make-manifest, dist-jar, dist-solrj, lucene-jars-to-solr">
<mkdir dir="${dist}" /> <mkdir dir="${dist}" />
<war destfile="${dist}/${fullnamever}.war" <war destfile="${dist}/${fullnamever}.war"
webxml="${web.xml}" webxml="${web.xml}"
@ -505,6 +514,9 @@
<exclude name="*.txt" /> <exclude name="*.txt" />
<exclude name="*.template" /> <exclude name="*.template" />
</lib> </lib>
<lib dir="lucene-libs"/>
<lib dir="${dist}"> <lib dir="${dist}">
<include name="${fullname}-solrj-${version}.jar" /> <include name="${fullname}-solrj-${version}.jar" />
<include name="${fullname}-core-${version}.jar" /> <include name="${fullname}-core-${version}.jar" />
@ -638,6 +650,53 @@
</target> </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 --> <!-- make a distribution -->
<target name="package" depends="generate-maven-artifacts"/> <target name="package" depends="generate-maven-artifacts"/>

View File

@ -15,13 +15,13 @@
limitations under the License. limitations under the License.
--> -->
<project name="common" xmlns:artifact="antlib:org.apache.maven.artifact.ant"> <project name="common-solr" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<description> <description>
This file is designed for importing into a main build file, and not intended This file is designed for importing into a main build file, and not intended
for standalone use. for standalone use.
</description> </description>
<dirname file="${ant.file.common}" property="common.dir"/> <dirname file="${ant.file.common}" property="common-solr.dir"/>
<!-- Initialize property values: allow easy customization via build.properties --> <!-- Initialize property values: allow easy customization via build.properties -->
<property file="build.properties" /> <property file="build.properties" />
@ -42,7 +42,7 @@
<property name="args" value="" /> <property name="args" value="" />
<!-- Example directory --> <!-- Example directory -->
<property name="example" value="${common.dir}/example" /> <property name="example" value="${common-solr.dir}/example" />
<!-- <!--
we attempt to exec svnversion to get details build information we attempt to exec svnversion to get details build information
for jar manifests. this property can be set at runtime to an for jar manifests. this property can be set at runtime to an
@ -95,13 +95,13 @@
value="http://lucene.apache.org/java/3_1_0/api/all/"/> value="http://lucene.apache.org/java/3_1_0/api/all/"/>
<property name="javadoc.packages" value="org.apache.solr.*"/> <property name="javadoc.packages" value="org.apache.solr.*"/>
<property name="build.docs" value="${dest}/docs"/> <property name="build.docs" value="${dest}/docs"/>
<property name="build.javadoc" value="${common.dir}/${build.docs}/api"/> <property name="build.javadoc" value="${common-solr.dir}/${build.docs}/api"/>
<property name="build.javadoc.solrj" value="${build.docs}/api-solrj"/> <property name="build.javadoc.solrj" value="${build.docs}/api-solrj"/>
<!-- JUnit properties --> <!-- JUnit properties -->
<property name="junit.includes" value="**/Test*.java,**/*Test.java"/> <property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
<property name="junit.output.dir" location="${common.dir}/${dest}/test-results"/> <property name="junit.output.dir" location="${common-solr.dir}/${dest}/test-results"/>
<property name="junit.reports" location="${common.dir}/${dest}/test-results/reports"/> <property name="junit.reports" location="${common-solr.dir}/${dest}/test-results/reports"/>
<property name="junit.formatter" value="plain"/> <property name="junit.formatter" value="plain"/>
<!-- Maven properties --> <!-- Maven properties -->
@ -168,7 +168,7 @@
<attribute name="basedir" default="." /> <attribute name="basedir" default="." />
<attribute name="includes" default="org/apache/**" /> <attribute name="includes" default="org/apache/**" />
<attribute name="excludes" default="" /> <attribute name="excludes" default="" />
<attribute name="manifest" default="${common.dir}/${dest}/META-INF/MANIFEST.MF" /> <attribute name="manifest" default="${common-solr.dir}/${dest}/META-INF/MANIFEST.MF" />
<element name="nested" optional="true" implicit="true" /> <element name="nested" optional="true" implicit="true" />
<sequential> <sequential>
<jar destfile="@{destfile}" <jar destfile="@{destfile}"
@ -177,7 +177,7 @@
excludes="@{excludes}" excludes="@{excludes}"
filesetmanifest="skip" filesetmanifest="skip"
manifest="@{manifest}"> manifest="@{manifest}">
<metainf dir="${common.dir}" includes="LICENSE.txt,NOTICE.txt"/> <metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt"/>
<nested /> <nested />
</jar> </jar>
</sequential> </sequential>

View File

@ -30,11 +30,24 @@
<property name="download.dir" value="lib/downloads"/> <property name="download.dir" value="lib/downloads"/>
<property name="example.local" value="example"/> <property name="example.local" value="example"/>
<path id="lucene.classpath">
<pathelement location="../../../lucene/build/classes/java" />
<pathelement location="../../../lucene/build/contrib/analyzers/common/classes/java" />
<pathelement location="../../../lucene/build/contrib/fast-vector-highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/memory/classes/java" />
<pathelement location="../../../lucene/build/contrib/misc/classes/java" />
<pathelement location="../../../lucene/build/contrib/queries/classes/java" />
<pathelement location="../../../lucene/build/contrib/spatial/classes/java" />
<pathelement location="../../../lucene/build/contrib/spellchecker/classes/java" />
</path>
<path id="common.classpath"> <path id="common.classpath">
<fileset dir="lib"/> <fileset dir="lib"/>
<fileset dir="${download.dir}"/> <fileset dir="${download.dir}"/>
<pathelement location="${solr-path}/build/solr"/> <pathelement location="${solr-path}/build/solr"/>
<pathelement location="${solr-path}/build/solrj"/> <pathelement location="${solr-path}/build/solrj"/>
<path refid="lucene.classpath"/>
<fileset dir="${solr-path}/lib" includes="*.jar"/> <fileset dir="${solr-path}/lib" includes="*.jar"/>
</path> </path>
@ -106,7 +119,7 @@
<target name="build" depends="compile"> <target name="build" depends="compile">
<solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes" <solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF"/> manifest="../../${dest}/META-INF/MANIFEST.MF"/>
</target> </target>
<target name="compileTests" depends="compile"> <target name="compileTests" depends="compile">

View File

@ -24,6 +24,18 @@
<import file="../../common-build.xml"/> <import file="../../common-build.xml"/>
<path id="lucene.classpath">
<pathelement location="../../../lucene/build/classes/java" />
<pathelement location="../../../lucene/build/contrib/analyzers/common/classes/java" />
<pathelement location="../../../lucene/build/contrib/fast-vector-highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/memory/classes/java" />
<pathelement location="../../../lucene/build/contrib/misc/classes/java" />
<pathelement location="../../../lucene/build/contrib/queries/classes/java" />
<pathelement location="../../../lucene/build/contrib/spatial/classes/java" />
<pathelement location="../../../lucene/build/contrib/spellchecker/classes/java" />
</path>
<description> <description>
Data Import Handler Data Import Handler
</description> </description>
@ -37,6 +49,7 @@
<pathelement location="${solr-path}/build/solr" /> <pathelement location="${solr-path}/build/solr" />
<pathelement location="${solr-path}/build/solrj" /> <pathelement location="${solr-path}/build/solrj" />
<fileset dir="${solr-path}/lib" includes="*.jar"/> <fileset dir="${solr-path}/lib" includes="*.jar"/>
<path refid="lucene.classpath"/>
</path> </path>
<path id="extras.classpath"> <path id="extras.classpath">
@ -103,9 +116,9 @@
<target name="build" depends="compile,compileExtras"> <target name="build" depends="compile,compileExtras">
<solr-jar destfile="target/${fullnamever}.jar" basedir="target/classes" <solr-jar destfile="target/${fullnamever}.jar" basedir="target/classes"
manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF" /> manifest="../../${dest}/META-INF/MANIFEST.MF" />
<solr-jar destfile="target/apache-${ant.project.name}-extras-${version}.jar" basedir="target/extras/classes" <solr-jar destfile="target/apache-${ant.project.name}-extras-${version}.jar" basedir="target/extras/classes"
manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF" /> manifest="../../${dest}/META-INF/MANIFEST.MF" />
</target> </target>
<target name="compileTests" depends="compile"> <target name="compileTests" depends="compile">

View File

@ -25,6 +25,18 @@
<import file="../../common-build.xml"/> <import file="../../common-build.xml"/>
<path id="lucene.classpath">
<pathelement location="../../../lucene/build/classes/java" />
<pathelement location="../../../lucene/build/contrib/analyzers/common/classes/java" />
<pathelement location="../../../lucene/build/contrib/fast-vector-highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/memory/classes/java" />
<pathelement location="../../../lucene/build/contrib/misc/classes/java" />
<pathelement location="../../../lucene/build/contrib/queries/classes/java" />
<pathelement location="../../../lucene/build/contrib/spatial/classes/java" />
<pathelement location="../../../lucene/build/contrib/spellchecker/classes/java" />
</path>
<description> <description>
Solr Integration with Tika for extracting content from binary file formats such as Microsoft Word and Adobe PDF. Solr Integration with Tika for extracting content from binary file formats such as Microsoft Word and Adobe PDF.
</description> </description>
@ -34,6 +46,7 @@
<pathelement location="${solr-path}/build/solrj" /> <pathelement location="${solr-path}/build/solrj" />
<fileset dir="lib" includes="*.jar"/> <fileset dir="lib" includes="*.jar"/>
<fileset dir="${solr-path}/lib" includes="*.jar"/> <fileset dir="${solr-path}/lib" includes="*.jar"/>
<path refid="lucene.classpath"/>
</path> </path>
<path id="test.classpath"> <path id="test.classpath">
@ -63,7 +76,7 @@
<target name="build" depends="compile"> <target name="build" depends="compile">
<solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes" <solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF"> manifest="../../${dest}/META-INF/MANIFEST.MF">
<!--<zipfileset src="${tika.lib}"/>--> <!--<zipfileset src="${tika.lib}"/>-->
</solr-jar> </solr-jar>
</target> </target>

View File

@ -23,6 +23,18 @@
<import file="../../common-build.xml"/> <import file="../../common-build.xml"/>
<path id="lucene.classpath">
<pathelement location="../../../lucene/build/classes/java" />
<pathelement location="../../../lucene/build/contrib/analyzers/common/classes/java" />
<pathelement location="../../../lucene/build/contrib/fast-vector-highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/highlighter/classes/java" />
<pathelement location="../../../lucene/build/contrib/memory/classes/java" />
<pathelement location="../../../lucene/build/contrib/misc/classes/java" />
<pathelement location="../../../lucene/build/contrib/queries/classes/java" />
<pathelement location="../../../lucene/build/contrib/spatial/classes/java" />
<pathelement location="../../../lucene/build/contrib/spellchecker/classes/java" />
</path>
<description> <description>
Solritas: Velocity Response Writer Solritas: Velocity Response Writer
</description> </description>
@ -32,6 +44,7 @@
<pathelement location="${solr-path}/build/solr" /> <pathelement location="${solr-path}/build/solr" />
<fileset dir="src/main/solr/lib" includes="*.jar"/> <fileset dir="src/main/solr/lib" includes="*.jar"/>
<fileset dir="${solr-path}/lib" includes="*.jar"></fileset> <fileset dir="${solr-path}/lib" includes="*.jar"></fileset>
<path refid="lucene.classpath"/>
</path> </path>
<path id="test.classpath"> <path id="test.classpath">
@ -61,7 +74,7 @@
<target name="build" depends="compile"> <target name="build" depends="compile">
<solr-jar destfile="src/main/solr/lib/${fullnamever}.jar" basedir="target/classes" <solr-jar destfile="src/main/solr/lib/${fullnamever}.jar" basedir="target/classes"
manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF"> manifest="../../${dest}/META-INF/MANIFEST.MF">
<fileset dir="src/main/java" excludes="**/*.java"/> <fileset dir="src/main/java" excludes="**/*.java"/>
</solr-jar> </solr-jar>
</target> </target>

View File

@ -1,2 +0,0 @@
AnyObjectId[b0cbcc9f623660e1a8ccdf2d22e0f9847687b260] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[a3e0b5ba94c0be4f1b90678a3edad30f5bda7bda] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[9a1be03163402a081ca97f77cbc9fb9e0ece9ea8] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[80a77c9bf82d5e170629e022160ef33f7328a6d1] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[3b4288125250d3860d6323669c79b9e8a89f642f] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[55da71e9537b5d05aee891cdf24abcfeb516ac5b] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[d02ab15d502b54929e9129c923de9d52ae8e2b20] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[b6add459cd59cde7e7cbf95b56cf57cab172d0e9] was removed in git history.
Apache SVN contains full history.

View File

@ -1,2 +0,0 @@
AnyObjectId[42b53bd657ba935286f349d24ebb7641bd9e3cc7] was removed in git history.
Apache SVN contains full history.