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"/>
|
|
|
|
<property file="${basedir}/default.properties"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-10 21:51:33 -04:00
|
|
|
<property name="javacc.main.class" value="org.javacc.parser.Main"/>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<!-- Build classpath -->
|
|
|
|
<path id="classpath">
|
|
|
|
<pathelement location="${build.classes}"/>
|
|
|
|
<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"/>
|
|
|
|
<pathelement location="${build.demo.classes}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="demo.classpath"/>
|
|
|
|
<pathelement location="${build.test.classes}"/>
|
|
|
|
</path>
|
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<path id="junit.classpath">
|
2003-09-18 12:56:18 -04:00
|
|
|
<pathelement location="${build.test.classes}"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
<pathelement location="${build.classes}"/>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<path id="anakia.classpath">
|
|
|
|
<fileset dir="${jakarta.site2.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 -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="init">
|
|
|
|
<mkdir dir="${build.dir}"/>
|
|
|
|
<mkdir dir="${build.classes}"/>
|
|
|
|
<mkdir dir="${build.src}"/>
|
|
|
|
|
|
|
|
<available
|
|
|
|
property="javacc.present"
|
2003-09-10 21:51:33 -04:00
|
|
|
classname="${javacc.main.class}"
|
|
|
|
classpath="${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-10-19 12:06:04 -04:00
|
|
|
|
|
|
|
<tstamp>
|
|
|
|
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
|
|
|
|
<format property="TSTAMP" pattern="HH:mm:ss"/>
|
|
|
|
</tstamp>
|
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-10 21:51:33 -04:00
|
|
|
JavaCC Zip: ${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
|
|
|
|
property to the path where JavaCC.zip is located. For example,
|
2003-09-10 21:51:33 -04:00
|
|
|
if you installed JavaCC in /usr/local/java/javacc3.2, then set the
|
2002-09-19 22:17:14 -04:00
|
|
|
javacc.home property to:
|
|
|
|
|
|
|
|
javacc.home=/usr/local/java/javacc2.0/bin
|
|
|
|
|
|
|
|
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 -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="compile-core" depends="init">
|
2002-09-19 22:17:14 -04:00
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
2003-09-10 21:51:33 -04:00
|
|
|
srcdir="${src.dir}"
|
2002-09-19 22:17:14 -04:00
|
|
|
includes="org/**/*.java"
|
|
|
|
destdir="${build.classes}"
|
|
|
|
debug="${debug}">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
|
|
|
|
<rmic classname="org.apache.lucene.search.RemoteSearchable"
|
2003-09-18 12:56:18 -04:00
|
|
|
base="${build.classes}">
|
2002-09-19 22:17:14 -04:00
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</rmic>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A R -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="jar-core" depends="compile-core">
|
2002-10-19 12:06:04 -04:00
|
|
|
|
2002-09-19 22:17:14 -04:00
|
|
|
<jar
|
|
|
|
jarfile="${build.dir}/${final.name}.jar"
|
|
|
|
basedir="${build.classes}"
|
2003-09-18 13:19:19 -04:00
|
|
|
excludes="**/*.java">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Created-By" value="Apache Jakarta"/>
|
|
|
|
<section name="org/apache/lucene">
|
|
|
|
<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"/>
|
|
|
|
<attribute name="Implementation-Version" value="build ${DSTAMP} ${TSTAMP}"/>
|
|
|
|
<attribute name="Implementation-Vemdpr" value="Lucene"/>
|
|
|
|
</section>
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
2003-09-18 13:19:19 -04:00
|
|
|
<!--
|
|
|
|
Manifest-Version: 1.0
|
|
|
|
Ant-Version: Apache Ant 1.6alpha
|
|
|
|
Created-By: Apache Jakarta
|
|
|
|
|
|
|
|
Name: org/apache/lucene
|
|
|
|
Specification-Title: Lucene Search Engine
|
|
|
|
Specification-Version: 1.3-rc2-dev
|
|
|
|
Specification-Vendor: Lucene
|
|
|
|
Implementation-Title: org.apache.lucene
|
|
|
|
Implementation-Version: build 2003-09-18 13:08:01
|
|
|
|
Implementation-Vendor: Lucene
|
|
|
|
-->
|
2002-09-19 22:17:14 -04:00
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="jar-demo" depends="compile-demo">
|
2002-09-19 22:17:14 -04:00
|
|
|
<jar
|
|
|
|
jarfile="${build.demo}/${build.demo.name}.jar"
|
|
|
|
basedir="${build.demo.classes}"
|
|
|
|
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">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${build.demo}/${build.demo.war.name}"/>
|
|
|
|
<mkdir dir="${build.demo}/${build.demo.war.name}/WEB-INF"/>
|
|
|
|
<mkdir dir="${build.demo}/${build.demo.war.name}/WEB-INF/lib"/>
|
|
|
|
|
|
|
|
<copy todir="${build.demo}/${build.demo.war.name}">
|
|
|
|
<fileset dir="${demo.jsp}">
|
|
|
|
<include name="**/*.jsp"/>
|
|
|
|
<include name="**/*.xml"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<copy todir="${build.demo}/${build.demo.war.name}/WEB-INF/lib">
|
|
|
|
<fileset dir="${build.dir}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<copy todir="${build.demo}/${build.demo.war.name}/WEB-INF/lib">
|
|
|
|
<fileset dir="${build.demo}">
|
|
|
|
<include name="*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
2003-09-18 12:56:18 -04:00
|
|
|
<jar
|
|
|
|
jarfile="${build.demo}/${build.demo.war.name}.war"
|
|
|
|
basedir="${build.demo}/${build.demo.war.name}"
|
|
|
|
excludes="**/*.java"
|
|
|
|
/>
|
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">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
|
|
|
|
<jar jarfile="${build.dir}/${final.name}-src.jar">
|
|
|
|
<fileset dir="${build.dir}" includes="**/*.java"/>
|
|
|
|
</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">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${build.demo}"/>
|
2003-09-18 12:56:18 -04:00
|
|
|
<mkdir dir="${build.demo.src}"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<copy todir="${build.demo.src}">
|
|
|
|
<fileset dir="${demo.src}">
|
|
|
|
<include name="**/*.java"/>
|
|
|
|
<include name="**/*.jj"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<mkdir dir="${build.demo.classes}"/>
|
|
|
|
|
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
|
|
|
srcdir="${build.demo.src}"
|
|
|
|
includes="**/*.java"
|
|
|
|
destdir="${build.demo.classes}"
|
|
|
|
debug="${debug}">
|
2002-11-07 12:31:27 -05:00
|
|
|
<classpath refid="demo.classpath"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- B U I L D T E S T -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="compile-test" depends="compile-core,compile-demo">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${build.test.classes}"/>
|
|
|
|
<javac
|
|
|
|
encoding="${build.encoding}"
|
2002-11-07 12:31:27 -05:00
|
|
|
srcdir="${test.src}"
|
2002-09-19 22:17:14 -04:00
|
|
|
includes="**/*.java"
|
|
|
|
destdir="${build.test.classes}"
|
2003-08-12 06:37:09 -04:00
|
|
|
debug="true">
|
2002-11-07 12:31:27 -05:00
|
|
|
<classpath refid="test.classpath"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- R U N T E S T S -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="test" depends="compile-test" if="junit.present">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${junit.reports}"/>
|
2003-09-18 14:09:28 -04:00
|
|
|
<junit printsummary="off" haltonfailure="no"
|
|
|
|
errorProperty="tests.failed" failureProperty="tests.failed">
|
2002-09-19 22:17:14 -04:00
|
|
|
<classpath refid="junit.classpath"/>
|
2003-08-12 06:37:09 -04:00
|
|
|
<formatter type="plain"/>
|
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-08-12 06:49:44 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.reports}" unless="testcase">
|
2003-09-18 12:56:18 -04:00
|
|
|
<fileset dir="${junit.src}" includes="**/Test*.java"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</batchtest>
|
2003-08-12 06:49:44 -04:00
|
|
|
<batchtest fork="yes" todir="${junit.reports}" if="testcase">
|
2003-09-18 12:56:18 -04:00
|
|
|
<fileset dir="${junit.src}" 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>
|
|
|
|
|
2003-09-18 13:42:35 -04:00
|
|
|
<!-- backwards compatible target - may be removed -->
|
|
|
|
<target name="test-unit" depends="test"/>
|
|
|
|
|
2003-09-18 14:09:28 -04:00
|
|
|
<target name="generate-test-reports" description="Generate test reports">
|
|
|
|
<mkdir dir="${junit.reports}/html"/>
|
|
|
|
<junitreport todir="${junit.reports}">
|
|
|
|
<fileset dir="${junit.reports}">
|
|
|
|
<include name="TEST-*.xml"/>
|
|
|
|
</fileset>
|
|
|
|
<report format="frames" todir="${junit.reports}/html"/>
|
|
|
|
</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
|
|
|
|
you have jakarta.site2.home set correctly.
|
|
|
|
</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
|
|
|
|
basedir="${docs.src}"
|
|
|
|
destdir="${docs.dest}/"
|
|
|
|
extension=".html" style="./site.vsl"
|
|
|
|
projectFile="stylesheets/project.xml"
|
|
|
|
excludes="**/stylesheets/** empty.xml"
|
|
|
|
includes="**/*.xml"
|
|
|
|
lastModifiedCheck="true"
|
|
|
|
templatePath="${jakarta.site2.home}/xdocs/stylesheets"
|
2003-09-18 12:56:18 -04:00
|
|
|
>
|
2002-09-19 22:17:14 -04:00
|
|
|
</anakia>
|
|
|
|
|
|
|
|
<copy todir="${docs.dest}/images" filtering="no">
|
|
|
|
<fileset dir="${docs.src}/images">
|
|
|
|
<include name="**/*.gif"/>
|
|
|
|
<include name="**/*.jpeg"/>
|
|
|
|
<include name="**/*.jpg"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- In case we have CSS someday
|
2001-09-18 12:31:24 -04:00
|
|
|
<copy todir="${docs.dest}" filtering="no">
|
2002-09-19 22:17:14 -04:00
|
|
|
<fileset dir="${docs.src}">
|
|
|
|
<include name="**/*.css"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
-->
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- J A V A D O C -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="javadocs">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${build.javadocs}"/>
|
|
|
|
<javadoc
|
|
|
|
sourcepath="${src.dir}:${build.src}"
|
|
|
|
overview="${src.dir}/overview.html"
|
|
|
|
packagenames="${packages}"
|
|
|
|
destdir="${build.javadocs}"
|
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>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- D I S T R I B U T I O N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="package" depends="jar-core, javadocs, war-demo">
|
2002-09-19 22:17:14 -04:00
|
|
|
<mkdir dir="${dist.dir}"/>
|
|
|
|
<mkdir dir="${dist.dir}/docs"/>
|
|
|
|
<mkdir dir="${dist.dir}/docs/api"/>
|
|
|
|
<mkdir dir="${dist.dir}/src/demo"/>
|
|
|
|
<mkdir dir="${dist.dir}/src/jsp"/>
|
|
|
|
|
|
|
|
<copy todir="${dist.dir}/docs">
|
|
|
|
<fileset dir="${docs.dir}"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}/docs/api">
|
|
|
|
<fileset dir="${build.javadocs}"/>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<copy todir="${dist.dir}/src/demo">
|
|
|
|
<fileset dir="src/demo"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}/src/jsp">
|
|
|
|
<fileset dir="src/jsp"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}/lib">
|
|
|
|
<fileset dir="lib"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist.dir}">
|
|
|
|
<fileset dir=".">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.txt"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/>
|
|
|
|
<copy file="${build.demo}/${build.demo.name}.jar" todir="${dist.dir}"/>
|
|
|
|
<copy file="${build.demo}/${build.demo.war.name}.war" todir="${dist.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- 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
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}.zip"/>
|
|
|
|
<zip
|
|
|
|
zipfile="${basedir}/${final.name}.zip"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}/**"
|
2003-06-16 21:24:14 -04:00
|
|
|
excludes="**/junit*jar"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
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">
|
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}.tar.gz"/>
|
|
|
|
<tar
|
|
|
|
tarfile="${basedir}/${final.name}.tar"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}/**"
|
2003-06-16 21:24:14 -04:00
|
|
|
excludes="**/junit*jar"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<gzip
|
|
|
|
zipfile="${basedir}/${final.name}.tar.gz"
|
|
|
|
src="${basedir}/${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 -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-all" depends="package-zip, package-tgz"
|
|
|
|
description="--> Generates the .tar.gz and .zip distributions">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- same as package-all. it is just here for compatibility. -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2003-09-18 13:42:35 -04:00
|
|
|
<target name="dist" depends="package-all"/>
|
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 -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-src" depends="jar-src">
|
|
|
|
<mkdir dir="${dist-src.dir}"/>
|
|
|
|
<copy todir="${dist-src.dir}/src">
|
|
|
|
<fileset dir="src"/>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${dist-src.dir}/lib">
|
|
|
|
<fileset dir="lib"/>
|
2001-11-18 20:19:23 -05:00
|
|
|
</copy>
|
2002-09-19 22:17:14 -04:00
|
|
|
<copy todir="${dist-src.dir}/" file="build.xml"/>
|
|
|
|
<copy todir="${dist-src.dir}/" file="default.properties"/>
|
|
|
|
<copy todir="${dist-src.dir}">
|
|
|
|
<fileset dir=".">
|
2003-09-18 12:56:18 -04:00
|
|
|
<include name="*.txt"/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy file="${build.dir}/${final.name}-src.jar" todir="${dist-src.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with zip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-zip-src" depends="package-src"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene sources as .zip">
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}-src.zip"/>
|
|
|
|
<zip
|
|
|
|
zipfile="${basedir}/${final.name}-src.zip"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}-src/**"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Packages the sources with tar-gzip -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="package-tgz-src" depends="package-src"
|
2003-09-18 12:56:18 -04:00
|
|
|
description="--> Generates the Lucene distribution as .tar.gz">
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar.gz"/>
|
|
|
|
<tar
|
|
|
|
tarfile="${basedir}/${final.name}-src.tar"
|
|
|
|
basedir="${basedir}/"
|
|
|
|
includes="**/${final.name}-src/**"
|
2003-09-18 12:56:18 -04:00
|
|
|
/>
|
2002-09-19 22:17:14 -04:00
|
|
|
|
|
|
|
<gzip
|
|
|
|
zipfile="${basedir}/${final.name}-src.tar.gz"
|
|
|
|
src="${basedir}/${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
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- C L E A N -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ================================================================== -->
|
2002-11-07 12:31:27 -05:00
|
|
|
<target name="clean">
|
2002-09-19 22:17:14 -04:00
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
<delete dir="${dist.dir}"/>
|
|
|
|
<delete file="${basedir}/${final.name}.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}.tar.gz"/>
|
|
|
|
<delete file="${basedir}/${final.name}.zip"/>
|
|
|
|
<delete dir="${dist.dir}-src"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.tar.gz"/>
|
|
|
|
<delete file="${basedir}/${final.name}-src.zip"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Build the Ant index task -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!--
|
|
|
|
<target name="anttask-init">
|
|
|
|
<property name="anttask.classes" location="${build.dir}/anttask/classes"/>
|
|
|
|
<mkdir dir="${anttask.classes}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="anttask-compile" depends="compile,anttask-init">
|
|
|
|
<javac
|
2002-02-26 20:10:58 -05:00
|
|
|
srcdir="${anttask.src}"
|
|
|
|
destdir="${anttask.classes}"
|
|
|
|
debug="${debug}">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Build the DocWeb app -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="docweb-init">
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- <mkdir dir="${}"/> -->
|
2002-02-26 20:10:58 -05:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
<target name="docweb-index" depends="javadocs,anttask-compile,docweb-init">
|
|
|
|
<taskdef name="index"
|
|
|
|
classname="org.apache.lucene.ant.IndexTask">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${anttask.classes}"/>
|
|
|
|
<path refid="classpath"/>
|
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
|
|
|
|
<index index="${build.docweb}/index"
|
|
|
|
overwrite="false">
|
|
|
|
<fileset dir="${docs.dir}"/>
|
|
|
|
<fileset dir="${build.javadocs}"/>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="docweb-war" depends="jar,jardemo,docweb-index">
|
|
|
|
<war warfile="${build.docweb}/${build.docweb.war.name}.war"
|
|
|
|
webxml="${demo.jsp}/WEB-INF/web.xml">
|
|
|
|
<fileset dir="${demo.jsp}" excludes="WEB-INF/"/>
|
|
|
|
<lib dir="${build.demo}" includes="*.jar"/>
|
|
|
|
<lib dir="${build.dir}" includes="*.jar"/>
|
|
|
|
<webinf dir="${build.docweb}" includes="index/"/>
|
|
|
|
</war>
|
|
|
|
</target>
|
|
|
|
-->
|
2003-09-10 21:51:33 -04:00
|
|
|
|
|
|
|
|
2003-09-18 12:56:18 -04:00
|
|
|
<!-- ================================================================== -->
|
|
|
|
<!-- Build the JavaCC files into the source tree -->
|
|
|
|
<!-- ================================================================== -->
|
|
|
|
<target name="javacc" depends="javacc-StandardAnalyzer,javacc-QueryParser,javacc-HTMLParser"/>
|
|
|
|
|
|
|
|
<target name="javacc-StandardAnalyzer" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<!-- generate this in a build directory so we can exclude ParseException -->
|
|
|
|
<mkdir dir="${build.src}/org/apache/lucene/analysis/standard"/>
|
|
|
|
<antcall target="invoke-javacc">
|
|
|
|
<param name="target" location="${src.dir}/org/apache/lucene/analysis/standard/StandardTokenizer.jj"/>
|
|
|
|
<param name="output.dir" location="${build.src}/org/apache/lucene/analysis/standard"/>
|
|
|
|
</antcall>
|
|
|
|
<copy todir="${src.dir}/org/apache/lucene/analysis/standard">
|
|
|
|
<fileset dir="${build.src}/org/apache/lucene/analysis/standard">
|
|
|
|
<include name="*.java"/>
|
|
|
|
<exclude name="ParseException.java"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<antcall target="invoke-javacc">
|
|
|
|
<param name="target" location="${src.dir}/org/apache/lucene/queryParser/QueryParser.jj"/>
|
|
|
|
<param name="output.dir" location="${src.dir}/org/apache/lucene/queryParser"/>
|
|
|
|
</antcall>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="javacc-HTMLParser" depends="init,javacc-check" if="javacc.present">
|
|
|
|
<antcall target="invoke-javacc">
|
|
|
|
<param name="target" location="${demo.src}/org/apache/lucene/demo/html/HTMLParser.jj"/>
|
|
|
|
<param name="output.dir" location="${demo.src}/org/apache/lucene/demo/html"/>
|
|
|
|
</antcall>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="invoke-javacc">
|
|
|
|
<java classname="${javacc.main.class}" fork="true">
|
|
|
|
<classpath path="${javacc.jar}"/>
|
|
|
|
|
|
|
|
<sysproperty key="install.root" file="${javacc.home}"/>
|
|
|
|
|
|
|
|
<arg value="-OUTPUT_DIRECTORY:${output.dir}"/>
|
|
|
|
<arg value="${target}"/>
|
|
|
|
</java>
|
|
|
|
</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>
|