2008-12-06 08:04:26 -05:00
|
|
|
<?xml version="1.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.
|
|
|
|
-->
|
|
|
|
|
2008-12-07 15:21:03 -05:00
|
|
|
<project name="solr-cell" default="build">
|
2008-12-06 08:04:26 -05:00
|
|
|
|
|
|
|
<property name="solr-path" value="../.." />
|
|
|
|
|
|
|
|
<import file="../../common-build.xml"/>
|
2010-03-18 00:39:17 -04:00
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
<description>
|
|
|
|
Solr Integration with Tika for extracting content from binary file formats such as Microsoft Word and Adobe PDF.
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<path id="common.classpath">
|
2008-12-07 14:07:11 -05:00
|
|
|
<pathelement location="${solr-path}/build/solr" />
|
|
|
|
<pathelement location="${solr-path}/build/solrj" />
|
2008-12-06 08:04:26 -05:00
|
|
|
<fileset dir="lib" includes="*.jar"/>
|
2008-12-07 15:21:03 -05:00
|
|
|
<fileset dir="${solr-path}/lib" includes="*.jar"/>
|
2010-03-18 00:39:17 -04:00
|
|
|
<path refid="lucene.classpath"/>
|
2008-12-06 08:04:26 -05:00
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="common.classpath" />
|
|
|
|
<pathelement path="${dest}/classes" />
|
|
|
|
<pathelement path="${dest}/test-classes" />
|
2010-07-13 17:45:31 -04:00
|
|
|
<pathelement location="${solr-path}/build/tests"/> <!-- include solr test code -->
|
|
|
|
<pathelement location="${solr-path}/../lucene/build/classes/test" /> <!-- include some lucene test code -->
|
2008-12-06 08:04:26 -05:00
|
|
|
<pathelement path="${java.class.path}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete failonerror="false" dir="${dest}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<mkdir dir="${dest}/classes"/>
|
|
|
|
<mkdir dir="${build.javadoc}" />
|
|
|
|
<ant dir="../../" inheritall="false" target="compile" />
|
|
|
|
<ant dir="../../" inheritall="false" target="make-manifest" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="init">
|
|
|
|
<solr-javac destdir="${dest}/classes"
|
|
|
|
classpathref="common.classpath">
|
|
|
|
<src path="src/main/java" />
|
|
|
|
</solr-javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build" depends="compile">
|
|
|
|
<solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
|
2010-03-18 00:39:17 -04:00
|
|
|
manifest="../../${dest}/META-INF/MANIFEST.MF">
|
2010-08-05 12:56:45 -04:00
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
</solr-jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compileTests" depends="compile">
|
|
|
|
<solr-javac destdir="${dest}/test-classes"
|
|
|
|
classpathref="test.classpath">
|
|
|
|
<src path="src/test/java" />
|
|
|
|
</solr-javac>
|
|
|
|
</target>
|
|
|
|
|
2010-08-02 12:59:23 -04:00
|
|
|
<property name="tempDir" value="${junit.output.dir}/temp" />
|
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
<target name="test" depends="compileTests">
|
|
|
|
<mkdir dir="${junit.output.dir}"/>
|
2010-08-02 12:59:23 -04:00
|
|
|
<!-- <mkdir dir="@{tempDir}/@{pattern}"/>
|
|
|
|
This is very loud and obnoxious. abuse touch instead for a "quiet" mkdir
|
|
|
|
-->
|
|
|
|
<touch file="${tempDir}/quiet.ant" verbose="false" mkdirs="true"/>
|
2008-12-06 08:04:26 -05:00
|
|
|
|
2010-07-22 18:17:16 -04:00
|
|
|
<condition property="runall">
|
|
|
|
<not>
|
|
|
|
<or>
|
|
|
|
<isset property="testcase"/>
|
|
|
|
<isset property="testpackage"/>
|
|
|
|
<isset property="testpackageroot"/>
|
|
|
|
</or>
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
<junit printsummary="on"
|
|
|
|
haltonfailure="no"
|
2010-03-22 14:28:57 -04:00
|
|
|
maxmemory="512M"
|
2008-12-06 08:04:26 -05:00
|
|
|
errorProperty="tests.failed"
|
|
|
|
failureProperty="tests.failed"
|
|
|
|
dir="src/test/resources/"
|
2010-08-02 12:59:23 -04:00
|
|
|
tempdir="${tempDir}"
|
2008-12-06 08:04:26 -05:00
|
|
|
>
|
2010-08-01 12:38:27 -04:00
|
|
|
<sysproperty key="jetty.insecurerandom" value="1"/>
|
2010-08-02 12:59:23 -04:00
|
|
|
<sysproperty key="tempDir" file="${tempDir}"/>
|
2008-12-06 08:04:26 -05:00
|
|
|
<formatter type="brief" usefile="false" if="junit.details"/>
|
|
|
|
<classpath refid="test.classpath"/>
|
2010-04-11 06:31:34 -04:00
|
|
|
<assertions>
|
|
|
|
<enable package="org.apache.lucene"/>
|
|
|
|
<enable package="org.apache.solr"/>
|
|
|
|
</assertions>
|
2008-12-06 08:04:26 -05:00
|
|
|
<formatter type="xml"/>
|
2010-07-22 18:17:16 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
|
2008-12-06 08:04:26 -05:00
|
|
|
<fileset dir="src/test/java" includes="${junit.includes}"/>
|
|
|
|
</batchtest>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
|
|
|
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
|
|
|
|
</batchtest>
|
2010-07-22 18:17:16 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
|
|
|
|
<fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
|
|
|
|
</batchtest>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
|
|
|
|
<fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
|
|
|
|
</batchtest>
|
2008-12-06 08:04:26 -05:00
|
|
|
</junit>
|
|
|
|
|
|
|
|
<fail if="tests.failed">Tests failed!</fail>
|
|
|
|
</target>
|
|
|
|
|
2008-12-07 15:21:03 -05:00
|
|
|
<target name="test-reports"
|
|
|
|
description="Generates HTML test reports.">
|
|
|
|
<mkdir dir="${junit.reports}"/>
|
|
|
|
<junitreport todir="${junit.output.dir}">
|
|
|
|
<fileset dir="${junit.output.dir}">
|
|
|
|
<include name="TEST-*.xml"/>
|
|
|
|
</fileset>
|
|
|
|
<report format="frames" todir="${junit.reports}"/>
|
|
|
|
</junitreport>
|
|
|
|
</target>
|
|
|
|
|
2008-12-06 08:04:26 -05:00
|
|
|
<target name="dist" depends="build">
|
2008-12-12 10:18:24 -05:00
|
|
|
<copy file="build/${fullnamever}.jar" todir="${solr-path}/dist"/>
|
2008-12-06 08:04:26 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="example" depends="build">
|
2009-10-12 10:41:51 -04:00
|
|
|
<!-- :NOOP: this use to copy libs but now we can refer to them by path -->
|
2008-12-06 08:04:26 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javadoc">
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="${build.javadoc}/contrib-${name}"/>
|
|
|
|
|
|
|
|
<path id="javadoc.classpath">
|
|
|
|
<path refid="common.classpath"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<invoke-javadoc
|
|
|
|
destdir="${build.javadoc}/contrib-${name}"
|
|
|
|
title="${Name} ${version} contrib-${fullnamever} API">
|
|
|
|
<sources>
|
|
|
|
<packageset dir="src/main/java"/>
|
|
|
|
</sources>
|
|
|
|
</invoke-javadoc>
|
|
|
|
</sequential>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2009-10-12 10:41:51 -04:00
|
|
|
</project>
|