2009-05-20 09:29:52 -04: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.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<project name="solr-clustering" default="build">
|
2009-07-27 12:20:49 -04:00
|
|
|
|
|
|
|
<property name="solr-path" value="../.."/>
|
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<import file="../../common-build.xml"/>
|
|
|
|
|
|
|
|
<description>
|
|
|
|
Clustering Integraton
|
|
|
|
</description>
|
|
|
|
|
2009-07-27 12:20:49 -04:00
|
|
|
<property name="download.dir" value="lib/downloads"/>
|
|
|
|
<property name="example.local" value="example"/>
|
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<path id="common.classpath">
|
|
|
|
<fileset dir="lib"/>
|
2009-07-27 12:20:49 -04:00
|
|
|
<fileset dir="${download.dir}"/>
|
|
|
|
<pathelement location="${solr-path}/build/solr"/>
|
|
|
|
<pathelement location="${solr-path}/build/solrj"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
<fileset dir="${solr-path}/lib" includes="*.jar"/>
|
|
|
|
</path>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<path id="test.classpath">
|
2009-07-27 12:20:49 -04:00
|
|
|
<pathelement path="${dest}/classes"/>
|
|
|
|
<pathelement path="${dest}/test-classes"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
<pathelement path="${java.class.path}"/>
|
2009-07-27 12:20:49 -04:00
|
|
|
<path refid="common.classpath"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</path>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="clean">
|
2009-07-27 12:20:49 -04:00
|
|
|
<delete failonerror="false" dir="${dest}"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
|
|
|
|
</target>
|
|
|
|
<target name="clean-downloads">
|
2009-07-09 17:52:13 -04:00
|
|
|
<delete>
|
2009-07-27 12:20:49 -04:00
|
|
|
<fileset dir="${download.dir}"/>
|
2009-07-09 17:52:13 -04:00
|
|
|
</delete>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="init">
|
2009-07-27 12:20:49 -04:00
|
|
|
<mkdir dir="${dest}/classes"/>
|
|
|
|
<mkdir dir="${download.dir}" />
|
|
|
|
<mkdir dir="${build.javadoc}"/>
|
|
|
|
<ant dir="../../" inheritall="false" target="compile"/>
|
|
|
|
<ant dir="../../" inheritall="false" target="make-manifest"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
|
|
|
|
2009-06-15 19:48:11 -04:00
|
|
|
<target name="check-files" depends="proxy.setup">
|
2009-07-27 12:20:49 -04:00
|
|
|
<available file="${download.dir}/colt-1.2.0.jar" property="colt.exists"/>
|
|
|
|
<available file="${download.dir}/pcj-1.2.jar" property="pcj.exists"/>
|
|
|
|
<available file="${download.dir}/nni-1.0.0.jar" property="nni.exists"/>
|
|
|
|
<available file="${download.dir}/simple-xml-1.7.3.jar" property="simplexml.exists"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
2009-05-21 07:31:00 -04:00
|
|
|
<!-- http://mirrors.ibiblio.org/pub/mirrors/maven2/org/simpleframework/simple-xml/1.7.3/simple-xml-1.7.3.jar -->
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="get-colt" depends="check-files" unless="colt.exists">
|
|
|
|
<!-- Get the LGPL deps and put them in a separate dir -->
|
2009-07-27 12:20:49 -04:00
|
|
|
<get src="http://repo1.maven.org/maven2/colt/colt/1.2.0/colt-1.2.0.jar" dest="${download.dir}/colt-1.2.0.jar"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
|
|
|
<target name="get-nni" depends="check-files" unless="nni.exists">
|
|
|
|
<!-- Get the LGPL deps and put them in a separate dir -->
|
2009-07-27 12:20:49 -04:00
|
|
|
<get src="http://download.carrot2.org/maven2/org/carrot2/nni/1.0.0/nni-1.0.0.jar"
|
|
|
|
dest="${download.dir}/nni-1.0.0.jar"/>
|
2009-05-21 07:31:00 -04:00
|
|
|
</target>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-21 07:31:00 -04:00
|
|
|
<!-- Compile time dep. only -->
|
|
|
|
<target name="get-simple-xml" depends="check-files" unless="simplexml.exists">
|
|
|
|
<!-- Get the LGPL deps and put them in a separate dir -->
|
2009-07-27 12:20:49 -04:00
|
|
|
<get src="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/simpleframework/simple-xml/1.7.3/simple-xml-1.7.3.jar"
|
|
|
|
dest="${download.dir}/simple-xml-1.7.3.jar"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
|
|
|
|
</target>
|
|
|
|
<target name="get-pcj" depends="check-files" unless="pcj.exists">
|
|
|
|
<!-- Get the LGPL deps and put them in a separate dir -->
|
2009-07-27 12:20:49 -04:00
|
|
|
<get src="http://repo1.maven.org/maven2/pcj/pcj/1.2/pcj-1.2.jar" dest="${download.dir}/pcj-1.2.jar"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
2009-05-21 07:31:00 -04:00
|
|
|
<target name="get-libraries" depends="init, get-colt, get-pcj, get-nni, get-simple-xml"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
|
|
|
|
<target name="compile" depends="init, get-libraries">
|
|
|
|
<solr-javac destdir="${dest}/classes"
|
|
|
|
classpathref="common.classpath">
|
2009-07-27 12:20:49 -04:00
|
|
|
<src path="src/main/java"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</solr-javac>
|
|
|
|
</target>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="build" depends="compile">
|
|
|
|
<solr-jar destfile="${dest}/${fullnamever}.jar" basedir="${dest}/classes"
|
2009-07-27 12:20:49 -04:00
|
|
|
manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF"/>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="compileTests" depends="compile">
|
2009-07-27 12:20:49 -04:00
|
|
|
<solr-javac destdir="${dest}/test-classes"
|
|
|
|
classpathref="test.classpath">
|
|
|
|
<src path="src/test/java"/>
|
|
|
|
</solr-javac>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="example" depends="build">
|
2009-07-27 12:20:49 -04:00
|
|
|
<mkdir dir="${example.local}/lib"/>
|
|
|
|
<copy file="${dest}/${fullnamever}.jar" todir="${example.local}/lib"/>
|
|
|
|
<copy todir="${example.local}/lib">
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="lib/downloads">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
2009-05-20 09:29:52 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<target name="test" depends="compileTests">
|
2009-07-27 12:20:49 -04:00
|
|
|
<mkdir dir="${junit.output.dir}"/>
|
|
|
|
|
|
|
|
<junit printsummary="on"
|
2009-05-20 09:29:52 -04:00
|
|
|
haltonfailure="no"
|
|
|
|
errorProperty="tests.failed"
|
|
|
|
failureProperty="tests.failed"
|
|
|
|
dir="src/test/resources/"
|
2009-07-27 12:20:49 -04:00
|
|
|
>
|
2009-05-20 09:29:52 -04:00
|
|
|
<formatter type="brief" usefile="false" if="junit.details"/>
|
|
|
|
<classpath refid="test.classpath"/>
|
|
|
|
<formatter type="xml"/>
|
2009-07-27 12:20:49 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
2009-05-20 09:29:52 -04:00
|
|
|
<fileset dir="src/test/java" includes="${junit.includes}">
|
|
|
|
<exclude name="**/AbstractClusteringTest*"/>
|
|
|
|
</fileset>
|
|
|
|
</batchtest>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
|
|
|
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
|
|
|
|
<fail if="tests.failed">Tests failed!</fail>
|
|
|
|
</target>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="dist" depends="build">
|
2009-07-27 12:20:49 -04:00
|
|
|
<!--
|
|
|
|
<copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"/>
|
|
|
|
<copy todir="${solr-path}/build/web/WEB-INF/lib" flatten="true">
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
-->
|
2009-05-20 09:29:52 -04:00
|
|
|
<copy file="${dest}/${fullnamever}.jar" todir="${solr-path}/dist"/>
|
|
|
|
</target>
|
2009-07-27 12:20:49 -04:00
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
<target name="javadoc">
|
2009-07-27 12:20:49 -04:00
|
|
|
<sequential>
|
2009-05-20 09:29:52 -04:00
|
|
|
<mkdir dir="${build.javadoc}/contrib-${name}"/>
|
|
|
|
|
|
|
|
<path id="javadoc.classpath">
|
|
|
|
<path refid="common.classpath"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<invoke-javadoc
|
2009-07-27 12:20:49 -04:00
|
|
|
destdir="${build.javadoc}/contrib-${name}"
|
|
|
|
title="${Name} ${version} contrib-${fullnamever} API">
|
2009-05-20 09:29:52 -04:00
|
|
|
<sources>
|
|
|
|
<packageset dir="src/main/java"/>
|
|
|
|
</sources>
|
|
|
|
</invoke-javadoc>
|
|
|
|
</sequential>
|
2009-07-27 12:20:49 -04:00
|
|
|
</target>
|
|
|
|
|
2009-05-20 09:29:52 -04:00
|
|
|
</project>
|