2001-09-18 12:31:24 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<project name="Lucene" default="default" basedir=".">
|
2001-09-18 12:31:24 -04:00
|
|
|
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- Give user a chance to override without editing this file
|
|
|
|
(and without typing -D each time it compiles it -->
|
|
|
|
<property file="${user.home}/lucene.build.properties"/>
|
|
|
|
<property file="${user.home}/build.properties"/>
|
|
|
|
<property file="${basedir}/build.properties"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2004-03-26 04:42:28 -05:00
|
|
|
<tstamp>
|
|
|
|
<format property="current.year" pattern="yyyy"/>
|
2004-03-26 04:54:49 -05:00
|
|
|
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
|
|
|
|
<format property="TSTAMP" pattern="HH:mm:ss"/>
|
2004-03-26 04:42:28 -05:00
|
|
|
</tstamp>
|
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<property name="name" value="lucene"/>
|
|
|
|
<property name="Name" value="Lucene"/>
|
2005-02-07 18:57:02 -05:00
|
|
|
<property name="version" value="1.9-rc1-dev"/>
|
2004-03-26 04:42:28 -05:00
|
|
|
<property name="year" value="2000-${current.year}"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<property name="final.name" value="${name}-${version}"/>
|
2004-02-19 13:13:30 -05:00
|
|
|
<property name="javac.deprecation" value="on"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<property name="javac.debug" value="on"/>
|
|
|
|
<property name="project.name" value="site"/> <!-- todo: is this used by anakia or something else? -->
|
|
|
|
<property name="javadoc.link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
|
2004-05-30 16:24:20 -04:00
|
|
|
<property name="build.encoding" value="utf-8"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
|
|
|
|
<property name="build.dir" location="build"/>
|
|
|
|
<property name="dist.dir" location="dist"/>
|
|
|
|
|
|
|
|
<property name="demo.name" value="${name}-demos-${version}"/>
|
|
|
|
<property name="demo.war.name" value="luceneweb"/>
|
|
|
|
|
|
|
|
<property name="javacc.home" location="."/>
|
2003-09-10 21:51:33 -04:00
|
|
|
|
2005-03-11 22:16:12 -05:00
|
|
|
<property name="asf.site.home" location="../../../site"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
|
|
|
|
<property name="junit.output.dir" location="${build.dir}/test"/>
|
|
|
|
<property name="junit.reports" location="${build.dir}/test/reports"/>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- Build classpath -->
|
|
|
|
<path id="classpath">
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/java"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
<fileset dir="lib">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.jar"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
2002-11-07 12:31:27 -05:00
|
|
|
<path id="demo.classpath">
|
|
|
|
<path refid="classpath"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/demo"/>
|
2002-11-07 12:31:27 -05:00
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="demo.classpath"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/test"/>
|
2002-11-07 12:31:27 -05:00
|
|
|
</path>
|
|
|
|
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- classpath for deprecated test cases, should be removed when moving from 1.9 to 2.0 -->
|
|
|
|
<path id="test-deprecated.classpath">
|
|
|
|
<path refid="demo.classpath"/>
|
|
|
|
<pathelement location="${build.dir}/classes/test-deprecated"/>
|
|
|
|
</path>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<path id="junit.classpath">
|
2003-09-20 13:45:32 -04:00
|
|
|
<pathelement location="${build.dir}/classes/test"/>
|
|
|
|
<pathelement location="${build.dir}/classes/java"/>
|
2003-09-25 17:23:18 -04:00
|
|
|
<pathelement location="${build.dir}/classes/demo"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
<fileset dir="lib">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.jar"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</fileset>
|
2003-09-18 12:56:18 -04:00
|
|
|
<pathelement path="${java.class.path}"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</path>
|
|
|
|
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- junit classpath for deprecated test cases, should be removed when moving from 1.9 to 2.0 -->
|
|
|
|
<path id="junit-deprecated.classpath">
|
|
|
|
<pathelement location="${build.dir}/classes/test-deprecated"/>
|
|
|
|
<pathelement location="${build.dir}/classes/java"/>
|
|
|
|
<pathelement location="${build.dir}/classes/demo"/>
|
|
|
|
<fileset dir="lib">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement path="${java.class.path}"/>
|
|
|
|
</path>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<path id="anakia.classpath">
|
2005-03-11 22:16:12 -05:00
|
|
|
<fileset dir="${asf.site.home}/lib">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.jar"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Prepares the build directory -->
|
|
|
|
<!-- ================================================================== -->
|
2005-03-07 16:17:11 -05:00
|
|
|
<target name="javacc-uptodate-check">
|
|
|
|
<uptodate property="javacc.files.uptodate">
|
|
|
|
<srcfiles dir="src" includes="**/*.jj" />
|
|
|
|
<mapper type="glob" from="*.jj" to="*.java"/>
|
|
|
|
</uptodate>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc-notice" unless="javacc.files.uptodate">
|
|
|
|
<echo>
|
|
|
|
One or more of the JavaCC .jj files is newer than its corresponding
|
|
|
|
.java file. Run the "javacc" target to regenerate the artifacts.
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="init" depends="javacc-uptodate-check, javacc-notice">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${build.dir}"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${dist.dir}"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<available
|
|
|
|
property="javacc.present"
|
2005-03-07 11:08:02 -05:00
|
|
|
classname="org.javacc.parser.Main"
|
|
|
|
classpath="${javacc.home}/bin/lib/javacc.jar"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<available
|
|
|
|
property="junit.present"
|
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
<target name="javacc-check" depends="init">
|
|
|
|
<fail unless="javacc.present">
|
2002-09-19 22:17:14 -04:00
|
|
|
##################################################################
|
|
|
|
JavaCC not found.
|
|
|
|
JavaCC Home: ${javacc.home}
|
2003-09-20 13:45:32 -04:00
|
|
|
JavaCC JAR: ${javacc.jar}
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
Please download and install JavaCC from:
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
<http://javacc.dev.java.net>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
Then, create a build.properties file either in your home
|
|
|
|
directory, or within the Lucene directory and set the javacc.home
|
2003-09-20 13:45:32 -04:00
|
|
|
property to the path where JavaCC is installed. For example,
|
|
|
|
if you installed JavaCC in /usr/local/java/javacc-3.2, then set the
|
2002-09-19 22:17:14 -04:00
|
|
|
javacc.home property to:
|
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
javacc.home=/usr/local/java/javacc-3.2
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
If you get an error like the one below, then you have not installed
|
|
|
|
things correctly. Please check all your paths and try again.
|
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
java.lang.NoClassDefFoundError: org.javacc.parser.Main
|
2002-09-19 22:17:14 -04:00
|
|
|
##################################################################
|
2003-09-10 21:51:33 -04:00
|
|
|
</fail>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- C O M P I L E -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2004-02-19 13:13:30 -05:00
|
|
|
<target name="compile" depends="compile-core"/>
|
2003-10-13 10:15:14 -04:00
|
|
|
<target name="compile-core" depends="init"
|
|
|
|
description="Compiles core classes">
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/classes/java"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
2003-09-20 13:45:32 -04:00
|
|
|
srcdir="src/java"
|
2002-09-19 22:17:14 -04:00
|
|
|
includes="org/**/*.java"
|
2003-09-20 13:45:32 -04:00
|
|
|
destdir="${build.dir}/classes/java"
|
2004-02-19 13:13:30 -05:00
|
|
|
deprecation="${javac.deprecation}"
|
2003-09-20 13:45:32 -04:00
|
|
|
debug="${javac.debug}">
|
2002-09-19 22:17:14 -04:00
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<rmic classname="org.apache.lucene.search.RemoteSearchable"
|
2003-09-20 13:45:32 -04:00
|
|
|
base="${build.dir}/classes/java">
|
2002-09-19 22:17:14 -04:00
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</rmic>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A R -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2004-05-11 15:28:37 -04:00
|
|
|
<target name="jar" depends="jar-core"/>
|
2003-10-13 10:15:14 -04:00
|
|
|
<target name="jar-core" depends="compile-core"
|
|
|
|
description="Generates the Jar file">
|
2002-09-19 22:17:14 -04:00
|
|
|
<jar
|
2003-09-20 13:45:32 -04:00
|
|
|
destfile="${build.dir}/${final.name}.jar"
|
|
|
|
basedir="${build.dir}/classes/java"
|
2003-09-18 13:19:19 -04:00
|
|
|
excludes="**/*.java">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Created-By" value="Apache Jakarta"/>
|
2005-03-11 22:23:13 -05:00
|
|
|
<section name="org/apache/lucene/">
|
2003-09-18 13:19:19 -04:00
|
|
|
<attribute name="Specification-Title" value="Lucene Search Engine"/>
|
|
|
|
<attribute name="Specification-Version" value="${version}"/>
|
|
|
|
<attribute name="Specification-Vendor" value="Lucene"/>
|
|
|
|
<attribute name="Implementation-Title" value="org.apache.lucene"/>
|
2004-09-20 14:16:50 -04:00
|
|
|
<attribute name="Implementation-Version" value="build ${DSTAMP}"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="Lucene"/>
|
2003-09-18 13:19:19 -04:00
|
|
|
</section>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="jar-demo" depends="compile-demo">
|
2002-09-19 22:17:14 -04:00
|
|
|
<jar
|
2003-09-20 13:45:32 -04:00
|
|
|
destfile="${build.dir}/${demo.name}.jar"
|
|
|
|
basedir="${build.dir}/classes/demo"
|
2002-09-19 22:17:14 -04:00
|
|
|
excludes="**/*.java"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="war-demo" depends="jar-core,jar-demo">
|
2003-12-28 11:05:53 -05:00
|
|
|
<war destfile="${build.dir}/${demo.war.name}.war"
|
|
|
|
webxml="src/jsp/WEB-INF/web.xml">
|
|
|
|
<fileset dir="src/jsp" excludes="WEB-INF/web.xml"/>
|
|
|
|
<lib dir="${build.dir}" includes="${demo.name}.jar"/>
|
|
|
|
<lib dir="${build.dir}" includes="${final.name}.jar"/>
|
|
|
|
</war>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A R S O U R C E -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-10 21:51:33 -04:00
|
|
|
<target name="jar-src" depends="init">
|
2003-09-20 13:45:32 -04:00
|
|
|
<jar destfile="${build.dir}/${final.name}-src.jar">
|
|
|
|
<fileset dir="." includes="src/"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- B U I L D D E M O -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="compile-demo" depends="compile-core">
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/classes/demo"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
2003-09-20 13:45:32 -04:00
|
|
|
srcdir="src/demo"
|
2002-09-19 22:17:14 -04:00
|
|
|
includes="**/*.java"
|
2003-09-20 13:45:32 -04:00
|
|
|
destdir="${build.dir}/classes/demo"
|
|
|
|
debug="${javac.debug}">
|
2002-11-07 12:31:27 -05:00
|
|
|
<classpath refid="demo.classpath"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
2004-09-20 14:16:50 -04:00
|
|
|
<!-- GCJ -->
|
|
|
|
<target name="gcj" depends="jar,jar-demo">
|
|
|
|
<exec executable="make" dir="src/gcj" failonerror="true"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- B U I L D D E P R E C A T E D T E S T -->
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- should be removed when moving from lucene 1.9 to 2.0 -->
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
2004-12-05 13:24:35 -05:00
|
|
|
<target name="compile-test-deprecated" depends="compile-core,compile-demo">
|
|
|
|
<mkdir dir="${build.dir}/classes/test-deprecated"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
2004-12-05 13:24:35 -05:00
|
|
|
srcdir="src/test-deprecated"
|
2002-09-19 22:17:14 -04:00
|
|
|
includes="**/*.java"
|
2004-12-05 13:24:35 -05:00
|
|
|
destdir="${build.dir}/classes/test-deprecated"
|
2003-08-12 06:37:09 -04:00
|
|
|
debug="true">
|
2004-12-05 13:24:35 -05:00
|
|
|
<classpath refid="test-deprecated.classpath"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- R U N D E P R E C A T E D T E S T S -->
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- should be removed when moving from lucene 1.9 to 2.0 -->
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
2004-12-05 13:24:35 -05:00
|
|
|
<target name="test-deprecated" depends="compile-test-deprecated" description="Runs deprecated unit tests">
|
2004-04-07 19:53:21 -04:00
|
|
|
<fail unless="junit.present">
|
|
|
|
##################################################################
|
|
|
|
JUnit not found.
|
|
|
|
Please make sure junit.jar is in ANT_HOME/lib, or made available
|
|
|
|
to Ant using other mechanisms like -lib or CLASSPATH.
|
|
|
|
##################################################################
|
|
|
|
</fail>
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${junit.output.dir}"/>
|
2003-09-18 14:09:28 -04:00
|
|
|
<junit printsummary="off" haltonfailure="no"
|
|
|
|
errorProperty="tests.failed" failureProperty="tests.failed">
|
2004-12-05 13:24:35 -05:00
|
|
|
<classpath refid="junit-deprecated.classpath"/>
|
|
|
|
<sysproperty key="dataDir" file="src/test-deprecated"/>
|
|
|
|
<sysproperty key="tempDir" file="${build.dir}/test-deprecated"/>
|
2003-09-18 14:09:28 -04:00
|
|
|
<formatter type="xml"/>
|
2003-08-12 06:37:09 -04:00
|
|
|
<formatter type="brief" usefile="false"/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
2004-12-05 13:24:35 -05:00
|
|
|
<fileset dir="src/test-deprecated" includes="**/Test*.java"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</batchtest>
|
2003-09-20 13:45:32 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
2004-12-05 13:24:35 -05:00
|
|
|
<fileset dir="src/test-deprecated" includes="**/${testcase}.java"/>
|
2003-08-12 06:49:44 -04:00
|
|
|
</batchtest>
|
2002-09-19 22:17:14 -04:00
|
|
|
</junit>
|
2003-09-18 14:09:28 -04:00
|
|
|
|
|
|
|
<fail if="tests.failed">Tests failed!</fail>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
2004-12-05 13:24:35 -05:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- B U I L D T E S T -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="compile-test" depends="compile-core,compile-demo">
|
|
|
|
<mkdir dir="${build.dir}/classes/test"/>
|
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
|
|
|
srcdir="src/test"
|
|
|
|
includes="**/*.java"
|
|
|
|
destdir="${build.dir}/classes/test"
|
|
|
|
debug="true">
|
|
|
|
<classpath refid="test.classpath"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- R U N T E S T S -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="test" depends="compile-test" description="Runs unit tests">
|
|
|
|
<fail unless="junit.present">
|
|
|
|
##################################################################
|
|
|
|
JUnit not found.
|
|
|
|
Please make sure junit.jar is in ANT_HOME/lib, or made available
|
|
|
|
to Ant using other mechanisms like -lib or CLASSPATH.
|
|
|
|
##################################################################
|
|
|
|
</fail>
|
|
|
|
<mkdir dir="${junit.output.dir}"/>
|
|
|
|
<junit printsummary="off" haltonfailure="no"
|
|
|
|
errorProperty="tests.failed" failureProperty="tests.failed">
|
|
|
|
<classpath refid="junit.classpath"/>
|
|
|
|
<sysproperty key="dataDir" file="src/test"/>
|
|
|
|
<sysproperty key="tempDir" file="${build.dir}/test"/>
|
|
|
|
<formatter type="xml"/>
|
|
|
|
<formatter type="brief" usefile="false"/>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
2005-03-23 05:32:12 -05:00
|
|
|
<fileset dir="src/test" includes="**/Test*.java" excludes="**/TestPrecedenceQueryParser.java"/>
|
2004-12-05 13:24:35 -05:00
|
|
|
</batchtest>
|
|
|
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
|
|
|
<fileset dir="src/test" includes="**/${testcase}.java"/>
|
|
|
|
</batchtest>
|
|
|
|
</junit>
|
|
|
|
|
|
|
|
<fail if="tests.failed">Tests failed!</fail>
|
|
|
|
</target>
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<!-- backwards compatible target - may be removed -->
|
|
|
|
<target name="test-unit" depends="test"/>
|
|
|
|
|
2003-10-13 10:15:14 -04:00
|
|
|
<target name="generate-test-reports" description="Generates test reports">
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${junit.reports}"/>
|
|
|
|
<junitreport todir="${junit.output.dir}">
|
|
|
|
<fileset dir="${junit.output.dir}">
|
2003-09-18 14:09:28 -04:00
|
|
|
<include name="TEST-*.xml"/>
|
|
|
|
</fileset>
|
2003-09-20 13:45:32 -04:00
|
|
|
<report format="frames" todir="${junit.reports}"/>
|
2003-09-18 14:09:28 -04:00
|
|
|
</junitreport>
|
|
|
|
</target>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D O C U M E N T A T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="docs-prepare">
|
|
|
|
<available
|
|
|
|
classname="org.apache.velocity.anakia.AnakiaTask"
|
|
|
|
property="AnakiaTask.present"
|
|
|
|
classpathref="anakia.classpath"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="prepare-error" depends="docs-prepare" unless="AnakiaTask.present">
|
|
|
|
<echo>
|
|
|
|
AnakiaTask is not present! Please check to make sure that
|
2005-03-11 22:16:12 -05:00
|
|
|
you have asf.site.home set correctly.
|
2002-09-19 22:17:14 -04:00
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="docs" depends="prepare-error" if="AnakiaTask.present">
|
|
|
|
<taskdef
|
|
|
|
name="anakia"
|
|
|
|
classname="org.apache.velocity.anakia.AnakiaTask"
|
|
|
|
>
|
|
|
|
<classpath refid="anakia.classpath"/>
|
|
|
|
</taskdef>
|
|
|
|
|
|
|
|
<anakia
|
2003-09-20 13:45:32 -04:00
|
|
|
basedir="xdocs"
|
|
|
|
destdir="docs/"
|
2002-09-19 22:17:14 -04:00
|
|
|
extension=".html" style="./site.vsl"
|
|
|
|
projectFile="stylesheets/project.xml"
|
|
|
|
excludes="**/stylesheets/** empty.xml"
|
|
|
|
includes="**/*.xml"
|
|
|
|
lastModifiedCheck="true"
|
2005-03-11 22:16:12 -05:00
|
|
|
templatePath="${asf.site.home}/xdocs/stylesheets"
|
2003-10-22 21:59:55 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<copy todir="docs/images" filtering="no">
|
|
|
|
<fileset dir="xdocs/images">
|
2002-09-19 22:17:14 -04:00
|
|
|
<include name="**/*.gif"/>
|
|
|
|
<include name="**/*.jpeg"/>
|
|
|
|
<include name="**/*.jpg"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A V A D O C -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="javadocs">
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/docs/api"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
<javadoc
|
2003-09-20 13:45:32 -04:00
|
|
|
sourcepath="src/java"
|
|
|
|
overview="src/java/overview.html"
|
|
|
|
packagenames="org.apache.lucene.*"
|
|
|
|
destdir="${build.dir}/docs/api"
|
2002-09-23 00:08:55 -04:00
|
|
|
encoding="${build.encoding}"
|
2002-09-19 22:17:14 -04:00
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
|
|
|
link="${javadoc.link}"
|
|
|
|
windowtitle="${Name} ${version} API"
|
|
|
|
doctitle="${Name} ${version} API"
|
|
|
|
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved."
|
|
|
|
>
|
2003-09-18 05:25:35 -04:00
|
|
|
<tag name="todo" description="To Do:"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
2004-08-17 16:38:46 -04:00
|
|
|
<target name="javadocs-internal">
|
|
|
|
<mkdir dir="${build.dir}/docs/api-internal"/>
|
|
|
|
<javadoc
|
|
|
|
sourcepath="src/java"
|
|
|
|
overview="src/java/overview.html"
|
|
|
|
packagenames="org.apache.lucene.*"
|
|
|
|
access="package"
|
|
|
|
destdir="${build.dir}/docs/api-internal"
|
|
|
|
encoding="${build.encoding}"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
|
|
|
link="${javadoc.link}"
|
|
|
|
windowtitle="${Name} ${version} public and internal API"
|
|
|
|
doctitle="${Name} ${version} public and internal API"
|
|
|
|
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved."
|
|
|
|
>
|
|
|
|
<tag name="todo" description="To Do:"/>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="package" depends="jar-core, javadocs, war-demo"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the distribution with zip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-zip" depends="package"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene distribution as .zip">
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<delete file="${dist.dir}/${final.name}.zip"/>
|
|
|
|
<zip destfile="${dist.dir}/${final.name}.zip">
|
|
|
|
<zipfileset prefix="${final.name}" dir="."
|
|
|
|
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"/>
|
|
|
|
<zipfileset prefix="${final.name}" dir="${build.dir}"
|
|
|
|
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/"/>
|
|
|
|
</zip>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- packages the distribution with tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-tgz" depends="package"
|
|
|
|
description="--> Generates the lucene distribution as .tar.gz">
|
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<!-- todo: make includes patterns below into property to reuse in package-zip -->
|
|
|
|
<delete file="${build.dir}/${final.name}.tar"/>
|
|
|
|
<delete file="${dist.dir}/${final.name}.tar.gz"/>
|
|
|
|
<tar tarfile="${build.dir}/${final.name}.tar">
|
|
|
|
<tarfileset prefix="${final.name}" dir="."
|
|
|
|
includes="src/demo/,src/jsp/,build.xml,docs/,*.txt"/>
|
|
|
|
<tarfileset prefix="${final.name}" dir="${build.dir}"
|
|
|
|
includes="${final.name}.jar,${demo.war.name}.war,${demo.name}.jar,docs/"/>
|
|
|
|
</tar>
|
|
|
|
|
|
|
|
<gzip zipfile="${dist.dir}/${final.name}.tar.gz"
|
|
|
|
src="${build.dir}/${final.name}.tar"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- packages the distribution with zip and tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="package-all-binary" depends="package-zip, package-tgz"
|
|
|
|
description="--> Generates the .tar.gz and .zip distributions"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- same as package-all. it is just here for compatibility. -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="dist" depends="package-all-binary"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- S O U R C E D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="package-zip-src" depends="init"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene sources as .zip">
|
2003-09-20 13:45:32 -04:00
|
|
|
<zip destfile="${dist.dir}/${final.name}-src.zip">
|
|
|
|
<zipfileset prefix="${final.name}" dir="."
|
|
|
|
includes="src/,build.xml,lib/,docs/,*.txt"/>
|
|
|
|
</zip>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="package-tgz-src" depends="init"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene distribution as .tar.gz">
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<delete file="${build.dir}/${final.name}-src.tar"/>
|
|
|
|
<delete file="${dist.dir}/${final.name}-src.tar.gz"/>
|
|
|
|
<tar tarfile="${build.dir}/${final.name}-src.tar">
|
|
|
|
<tarfileset prefix="${final.name}" dir="."
|
|
|
|
includes="src/,build.xml,lib/,docs/,*.txt"/>
|
|
|
|
</tar>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<gzip zipfile="${dist.dir}/${final.name}-src.tar.gz"
|
|
|
|
src="${build.dir}/${final.name}-src.tar"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip and tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-all-src" depends="package-zip-src, package-tgz-src"
|
2003-09-18 13:42:35 -04:00
|
|
|
description="--> Generates the .tar.gz and .zip source distributions"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- same as package-all-src. it is just here for compatibility. -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="dist-src" depends="package-all-src"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-20 13:45:32 -04:00
|
|
|
<target name="dist-all" depends="dist, dist-src"/>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- C L E A N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-10-13 10:15:14 -04:00
|
|
|
<target name="clean"
|
|
|
|
description="Removes contents of build and dist directories">
|
2002-09-19 22:17:14 -04:00
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
<delete dir="${dist.dir}"/>
|
2003-10-22 21:59:55 -04:00
|
|
|
<delete file="velocity.log"/>
|
2002-02-26 20:10:58 -05:00
|
|
|
</target>
|
|
|
|
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- ================================================================== -->
|
2003-10-13 10:15:14 -04:00
|
|
|
<!-- Build the JavaCC files into the source tree -->
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- ================================================================== -->
|
2005-03-07 11:08:02 -05:00
|
|
|
<target name="jjdoc">
|
|
|
|
<mkdir dir="${build.dir}/docs/grammars"/>
|
|
|
|
<jjdoc target="src/java/org/apache/lucene/queryParser/QueryParser.jj"
|
|
|
|
outputfile="${build.dir}/docs/grammars/QueryParser.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
2005-03-07 11:18:37 -05:00
|
|
|
<jjdoc target="src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.jj"
|
2005-03-07 11:08:02 -05:00
|
|
|
outputfile="${build.dir}/docs/grammars/PrecedenceQueryParser.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
<jjdoc target="src/java/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
|
|
|
|
outputfile="${build.dir}/docs/grammars/StandardTokenizer.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
<jjdoc target="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"
|
|
|
|
outputfile="${build.dir}/docs/grammars/HTMLParser.html"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
</target>
|
|
|
|
|
2005-03-07 15:28:25 -05:00
|
|
|
<target name="clean-javacc">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="src">
|
|
|
|
<include name="java/org/apache/lucene/analysis/standard/StandardTokenizer.java"/>
|
|
|
|
<include name="java/org/apache/lucene/queryParser/QueryParser.java"/>
|
|
|
|
<include name="java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java"/>
|
|
|
|
<include name="demo/org/apache/lucene/demo/html/HTMLParser.java"/>
|
|
|
|
</fileset>
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc" depends="clean-javacc,javacc-StandardAnalyzer,javacc-QueryParser,javacc-PrecedenceQueryParser,javacc-HTMLParser"/>
|
2005-03-07 11:08:02 -05:00
|
|
|
|
|
|
|
<macrodef name="invoke-javacc">
|
|
|
|
<attribute name="target"/>
|
|
|
|
<attribute name="outputDir"/>
|
|
|
|
<sequential>
|
|
|
|
<javacc
|
|
|
|
target="@{target}"
|
|
|
|
outputDirectory="@{outputDir}"
|
|
|
|
debugTokenManager="${javacc.debug.tokenmgr}"
|
|
|
|
debugParser="${javacc.debug.parser}"
|
|
|
|
debuglookahead="${javacc.debug.lookahead}"
|
|
|
|
javacchome="${javacc.home}"
|
|
|
|
/>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2003-09-18 12:56:18 -04:00
|
|
|
|
|
|
|
<target name="javacc-StandardAnalyzer" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<!-- generate this in a build directory so we can exclude ParseException -->
|
2003-09-20 13:45:32 -04:00
|
|
|
<mkdir dir="${build.dir}/gen/org/apache/lucene/analysis/standard"/>
|
2005-03-07 11:08:02 -05:00
|
|
|
|
|
|
|
<invoke-javacc target="src/java/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
|
|
|
|
outputDir="${build.dir}/gen/org/apache/lucene/analysis/standard"
|
|
|
|
/>
|
2003-09-20 13:45:32 -04:00
|
|
|
<copy todir="src/java/org/apache/lucene/analysis/standard">
|
|
|
|
<fileset dir="${build.dir}/gen/org/apache/lucene/analysis/standard">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.java"/>
|
|
|
|
<exclude name="ParseException.java"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
|
2005-03-07 11:08:02 -05:00
|
|
|
<invoke-javacc target="src/java/org/apache/lucene/queryParser/QueryParser.jj"
|
|
|
|
outputDir="src/java/org/apache/lucene/queryParser"
|
|
|
|
/>
|
2003-09-18 12:56:18 -04:00
|
|
|
</target>
|
2005-03-07 11:08:02 -05:00
|
|
|
|
|
|
|
<target name="javacc-PrecedenceQueryParser" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<invoke-javacc target="src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.jj"
|
|
|
|
outputDir="src/java/org/apache/lucene/queryParser/precedence"
|
|
|
|
/>
|
2003-09-18 12:56:18 -04:00
|
|
|
</target>
|
|
|
|
|
2005-03-07 11:08:02 -05:00
|
|
|
<target name="javacc-HTMLParser" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<invoke-javacc target="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"
|
|
|
|
outputDir="src/demo/org/apache/lucene/demo/html"
|
|
|
|
/>
|
2003-09-18 12:56:18 -04:00
|
|
|
</target>
|
2003-09-10 21:51:33 -04:00
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="default" depends="jar-core"/>
|
|
|
|
|
2001-09-11 17:44:36 -04:00
|
|
|
</project>
|