2008-06-24 00:49:25 -04:00
|
|
|
<!--
|
|
|
|
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.
|
|
|
|
-->
|
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<project name="common-solr" default="default">
|
2008-06-24 00:49:25 -04:00
|
|
|
<description>
|
|
|
|
This file is designed for importing into a main build file, and not intended
|
|
|
|
for standalone use.
|
|
|
|
</description>
|
2008-08-04 01:56:10 -04:00
|
|
|
|
2010-03-19 09:01:40 -04:00
|
|
|
<dirname file="${ant.file.common-solr}" property="common-solr.dir"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
|
|
|
<property name="Name" value="Solr" />
|
2011-04-01 02:58:12 -04:00
|
|
|
<property name="version" value="4.0-SNAPSHOT"/>
|
|
|
|
<property name="final.name" value="apache-${name}-${version}"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<!-- solr uses 1.6 -->
|
|
|
|
<property name="javac.source" value="1.6"/>
|
|
|
|
<property name="javac.target" value="1.6"/>
|
2008-08-04 01:56:10 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<!-- solr uses its own build/dist directories -->
|
|
|
|
<property name="build.dir" location="${common-solr.dir}/build"/>
|
|
|
|
<property name="dist.dir" location="${common-solr.dir}/dist"/>
|
|
|
|
<property name="tests.userdir" value="${common-solr.dir}/src/test-files"/>
|
|
|
|
<property name="javadoc.dir" location="${common-solr.dir}/build/docs/api"/>
|
|
|
|
<property name="javadoc.link" value="http://java.sun.com/javase/6/docs/api/"/>
|
2011-02-05 18:36:32 -05:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<path id="additional.dependencies">
|
|
|
|
<fileset dir="${common-solr.dir}/lib" includes="**/*.jar"/>
|
|
|
|
<fileset dir="${common-solr.dir}/example/lib" includes="**/*.jar"/>
|
|
|
|
<fileset dir="lib" includes="**/*.jar" erroronmissingdir="false"/>
|
|
|
|
</path>
|
2008-06-24 00:49:25 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<pathconvert property="project.classpath" targetos="unix" refid="additional.dependencies"/>
|
2010-09-10 08:34:18 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>
|
2008-12-06 08:04:26 -05:00
|
|
|
|
2010-08-24 09:20:15 -04:00
|
|
|
<property name="tests.threadspercpu" value="2"/>
|
2008-08-13 06:08:04 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<import file="../lucene/contrib/contrib-build.xml"/>
|
2011-06-01 04:22:23 -04:00
|
|
|
<property name="tests.directory" value="random" />
|
2011-04-01 02:58:12 -04:00
|
|
|
|
|
|
|
<!-- solr depends on the following modules/contribs -->
|
|
|
|
<module-uptodate name="analysis/common" jarfile="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"
|
|
|
|
property="analyzers-common.uptodate" classpath.property="analyzers-common.jar"/>
|
|
|
|
<module-uptodate name="analysis/phonetic" jarfile="${common.dir}/../modules/analysis/build/phonetic/lucene-analyzers-phonetic-${version}.jar"
|
|
|
|
property="analyzers-phonetic.uptodate" classpath.property="analyzers-phonetic.jar"/>
|
2011-05-30 10:51:25 -04:00
|
|
|
<module-uptodate name="suggest" jarfile="${common.dir}/../modules/suggest/build/lucene-suggest-${version}.jar"
|
|
|
|
property="suggest.uptodate" classpath.property="suggest.jar"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
<contrib-uptodate name="highlighter" property="highlighter.uptodate" classpath.property="highlighter.jar"/>
|
|
|
|
<contrib-uptodate name="memory" property="memory.uptodate" classpath.property="memory.jar"/>
|
|
|
|
<contrib-uptodate name="misc" property="misc.uptodate" classpath.property="misc.jar"/>
|
|
|
|
<contrib-uptodate name="queries" property="queries.uptodate" classpath.property="queries.jar"/>
|
|
|
|
<contrib-uptodate name="spatial" property="spatial.uptodate" classpath.property="spatial.jar"/>
|
2011-05-30 10:51:25 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<path id="solr.base.classpath">
|
|
|
|
<pathelement path="${analyzers-common.jar}"/>
|
|
|
|
<pathelement path="${analyzers-phonetic.jar}"/>
|
|
|
|
<pathelement path="${highlighter.jar}"/>
|
|
|
|
<pathelement path="${memory.jar}"/>
|
|
|
|
<pathelement path="${misc.jar}"/>
|
|
|
|
<pathelement path="${queries.jar}"/>
|
|
|
|
<pathelement path="${spatial.jar}"/>
|
2011-05-30 10:51:25 -04:00
|
|
|
<pathelement path="${suggest.jar}"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
<pathelement location="${common-solr.dir}/build/classes/solrj"/>
|
|
|
|
<pathelement location="${common-solr.dir}/build/classes/webapp"/>
|
|
|
|
<pathelement location="${common-solr.dir}/build/classes/java"/>
|
|
|
|
<path refid="base.classpath"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="classpath" refid="solr.base.classpath"/>
|
|
|
|
|
|
|
|
<path id="solr.test.base.classpath">
|
|
|
|
<pathelement path="${common-solr.dir}/build/classes/test-framework"/>
|
|
|
|
<pathelement path="${common-solr.dir}/build/classes/test"/>
|
|
|
|
<pathelement path="${tests.userdir}"/>
|
|
|
|
<path refid="test.base.classpath"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath" refid="solr.test.base.classpath"/>
|
|
|
|
|
|
|
|
<!-- TODO: lucene and solr should share this macro -->
|
2008-06-24 00:49:25 -04:00
|
|
|
<macrodef name="contrib-crawl">
|
|
|
|
<attribute name="target" default=""/>
|
|
|
|
<attribute name="failonerror" default="true"/>
|
|
|
|
<sequential>
|
|
|
|
<subant target="@{target}" failonerror="@{failonerror}">
|
2011-04-01 02:58:12 -04:00
|
|
|
<property name="core.compiled" value="true"/>
|
|
|
|
<property name="solr.core.compiled" value="true"/>
|
|
|
|
<fileset dir="." includes="contrib/*/build.xml"/>
|
2008-06-24 00:49:25 -04:00
|
|
|
</subant>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2008-08-04 01:56:10 -04:00
|
|
|
|
2011-04-01 02:58:12 -04:00
|
|
|
<macrodef name="solr-contrib-uptodate">
|
|
|
|
<attribute name="name"/>
|
|
|
|
<attribute name="property" default="@{name}.uptodate"/>
|
|
|
|
<attribute name="classpath.property" default="@{name}.jar"/>
|
|
|
|
<!-- set jarfile only, if the target jar file has no generic name -->
|
|
|
|
<attribute name="jarfile" default="${common-solr.dir}/build/contrib/@{name}/@{name}-${version}.jar"/>
|
|
|
|
<sequential>
|
|
|
|
<!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/java'"/>-->
|
|
|
|
<property name="@{classpath.property}" location="@{jarfile}"/>
|
|
|
|
<uptodate property="@{property}" targetfile="@{jarfile}">
|
2011-06-01 18:37:09 -04:00
|
|
|
<srcfiles dir="${common-solr.dir}/contrib/@{name}/src/java" includes="**/*.java"/>
|
2011-04-01 02:58:12 -04:00
|
|
|
</uptodate>
|
2008-09-19 11:07:17 -04:00
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
2011-03-18 14:40:02 -04:00
|
|
|
<target name="validate" depends="validate-solr"/>
|
|
|
|
<target name="validate-solr" depends="check-legal-solr" unless="validated-solr"/>
|
|
|
|
|
2011-03-22 14:03:57 -04:00
|
|
|
<target name="check-legal-solr" depends="compile-tools">
|
2011-03-18 14:40:02 -04:00
|
|
|
<java classname="org.apache.lucene.validation.DependencyChecker" failonerror="true" fork="true">
|
|
|
|
<classpath>
|
2011-03-22 14:03:57 -04:00
|
|
|
<path refid="tools.runtime.classpath" />
|
2011-03-18 14:40:02 -04:00
|
|
|
</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
|
|
|
|
-->
|
|
|
|
<!-- Solr -->
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/analysis-extras/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/clustering/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/dataimporthandler/lib" />
|
|
|
|
<arg value="-c" />
|
2011-05-22 17:45:19 -04:00
|
|
|
<arg value="${basedir}/contrib/dataimporthandler-extras/lib" />
|
|
|
|
<arg value="-c" />
|
2011-03-18 14:40:02 -04:00
|
|
|
<arg value="${basedir}/contrib/extraction/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/contrib/uima/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/example/example-DIH/solr/db/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/example/example-DIH/solr/mail/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/example/example/lib" />
|
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="${basedir}/src/test-files/solr/lib" />
|
|
|
|
</java>
|
|
|
|
</target>
|
2011-05-30 20:08:14 -04:00
|
|
|
<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>
|
|
|
|
|
2011-06-01 18:37:09 -04:00
|
|
|
<target name="test" depends="compile-test,validate-solr,junit-mkdir,junit-sequential,junit-parallel" description="Runs unit tests"/>
|
|
|
|
|
2008-08-28 16:17:07 -04:00
|
|
|
</project>
|